This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/67551] New: Preprocessor generates non-ISO line directives
- From: "porten at kde dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Sep 2015 15:32:12 +0000
- Subject: [Bug preprocessor/67551] New: Preprocessor generates non-ISO line directives
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67551
Bug ID: 67551
Summary: Preprocessor generates non-ISO line directives
Product: gcc
Version: 5.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: porten at kde dot org
Target Milestone: ---
The code emitted by the preprocessor does produce warnings when compiled as
C/C++ code with -pedantic:
$ echo "int main() { return 0; }" > input.c
$ cpp -o output.c input.c
$ gcc -pedantic output.c
output.c:1:3: warning: style of line directive is a GCC extension
# 1 "input.c"
^
input.c:1:3: warning: style of line directive is a GCC extension
int main() { return 0; }
^
<built-in>: warning: style of line directive is a GCC extension
<command-line>:1:3: warning: style of line directive is a GCC extension
<command-line>:1:3: warning: style of line directive is a GCC extension
Admittedly, this is not the normal usage mode. And when using an .i suffix for
the output file (as done by -save-temps) the -pedantic check does not kick in.