Skip to content

Accept __has_include for GNU C standards. #454

@ludviggunne

Description

@ludviggunne

Using __has_include with -std=gnu... currently fails for C standards and C++ standards < 17:

file.c:

#if __has_include(<dir/file.h>)
#endif

Output:

$ ./simplecpp -std=gnu99 -e file.c
file.c:1: syntax error: failed to evaluate #if condition, division/modulo by zero

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions