Skip to content

Inconsistent use of diagnostic pragmas (-Wreturn-type) #9

@hirrolot

Description

@hirrolot

Currently, inside match99, we emit the ... diagnostic push and ... diagnostic ignored "-Wreturn-type" pragmas, but without otherwise99 we won't return to the previous diagnostics state:

DATATYPE99_PRIV_SUPPRESS_W_RETURN_TYPE \

I've spent some time trying to figure out how to automatically resolve this warning but with no success; therefore, the best solution for now is just don't suppress -Wreturn-type but to force a user to suppress it, if necessary.

FYI: The -Wreturn-type warning can be emitted due to the following reasons:

  • A false positive due to the generation of single-step for-loops and the switch statement over a (conceptually) strict enumeration; see this SO question.
  • C enumerations are seen by a compiler as ordinary integers -- see another SO question of mine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions