Skip to content

Type aliases do not interact correctly with format specifiers #704

@bocchino

Description

@bocchino

If the type associated with a format specifier is an alias type, the implementation should use the underlying type for analysis and code generation. Currently it uses the alias type. This causes the following problems:

  1. An alias of an integer type is not recognized as an integer type, so it can't be used with an integer format specifier such as x.
  2. When generating code for a format corresponding to an alias type, the code generator writes %s, which is not correct in general.
  • Fix analysis
  • Add unit tests for fpp-check
  • Fix code gen
  • Add unit tests for fpp-to-cpp

Metadata

Metadata

Assignees

Labels

code generationIssues related to code generationsemanticsIssues related to semantics

Type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions