-
Notifications
You must be signed in to change notification settings - Fork 249
Closed
Description
Compiling with GCC version 11.1.0 produces several pre-processor warnings :
Steps to reproduce, with a minimal example:
- Install GCC version 11.1.0 and CompCert version 3.9
- Try to compile a file
min.c, containingint main() { return 0; }, with the commandccomp hello.c
The following errors are printed:
min.c:1: warning: unrecognized '#' line
min.c:2: warning: unrecognized '#' line
min.c:3: warning: unrecognized '#' line
/usr/include/stdc-predef.h:1: warning: unrecognized '#' line
I have tried the same steps with GCC version 10.2.0, but the warnings do not appear.
A possible explanation suggested by @monniaux could be the use of null line numbers in linemarkers by GCC 11.
With GCC 11.1.0, the preprocessor produces the following results:
$ gcc -E min.c
# 0 "min.c"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "min.c"
int main() { return 0; }
With GCC 10.2.0:
$ gcc -E min.c
# 1 "min.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 31 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 32 "<command-line>" 2
# 1 "min.c"
int main() { return 0; }
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels