Skip to content

Evaluation of constant expression in preprocessing directives may produce incorrect results #131

Description

@pmor13
#if (1 ? -2 : 1u) < 0
#error
#endif
File : "<source>"
    1:#if (1 ? -2 : 0 + 1u) < 0
    2:#error
       ^ 
2022-04-24 21:27:27,454 |     INFO |       root | ppci 0.5.5 compiler on CPython 3.8.10 on Linux-5.13.0-1021-aws-x86_64-with-glibc2.29
2022-04-24 21:27:27,457 |     INFO |   cbuilder | Starting C compilation (c99)
2022-04-24 21:27:27,458 |    ERROR |       root | 
2022-04-24 21:27:27,458 |    ERROR |       root | (<source>, 2, 2)
Compiler returned: 1
ppci 0.5.5

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