Skip to content

c-xcodeml.c triggers compilation error when passing NULL as va_list #170

@alexeedm

Description

@alexeedm

When trying to compile the code on Arm, I'm getting the following errors:

"c-xcodeml.c", line 254: error: argument of type "void *" is incompatible with parameter of type "va_list"
          voutxTag(fp, indent, expr, tag, xattrFlag, attrFmt, NULL);
                                                              ^

"c-xcodeml.c", line 287: error: argument of type "void *" is incompatible with parameter of type "va_list"
              attrFmt, NULL);
                       ^

"c-xcodeml.c", line 306: error: argument of type "void *" is incompatible with parameter of type "va_list"
              attrFmt, NULL);
                       ^

By C standard va_list is not necessarily a pointer, so the cast is invalid.
Similar errors happen in the F-output-xcodeml.c file. I'll try to make a pull request with the fixes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions