https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
Bug ID: 111965
Summary: -fno-debug-cpp does not disable -fdebug-cpp
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: zsojka at seznam dot cz
Target Milestone: ---
Host: x86_64-pc-linux-gnu
-fdebug-cpp and -fno-debug-cpp do the same:
$ gcc -E -o- - < /dev/null
# 0 "<stdin>"
# 0 "<built-in>"
# 0 "<command-line>"
# 1 "/usr/include/stdc-predef.h" 1 3 4
# 0 "<command-line>" 2
# 1 "<stdin>"
$ gcc -E -o- -fdebug-cpp - < /dev/null
{P:<stdin>;F:<NULL>;L:0;C:0;S:0;M:0x7f68eecc8000;E:0,LOC:32,R:32}# 0 "<stdin>"
{P:<built-in>;F:<NULL>;L:0;C:0;S:0;M:0x7f68eecc8018;E:0,LOC:64,R:64}# 0
"<built-in>"
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f68eecc8030;E:0,LOC:96,R:96}# 0
"<command-line>"
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f68eecc8030;E:0,LOC:96,R:96}{P:/usr/include/stdc-predef.h;F:<command-line>;L:1;C:0;S:1;M:0x7f68eecc8048;E:0,LOC:128,R:128}#
1 "/usr/include/stdc-predef.h" 1 3 4
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f68eecc8060;E:0,LOC:258432,R:258432}#
0 "<command-line>" 2
{P:<stdin>;F:<NULL>;L:1;C:0;S:0;M:0x7f68eecc8078;E:0,LOC:258464,R:258464}# 1
"<stdin>"
$ gcc -E -o- -fno-debug-cpp - < /dev/null
{P:<stdin>;F:<NULL>;L:0;C:0;S:0;M:0x7f4ee211d000;E:0,LOC:32,R:32}# 0 "<stdin>"
{P:<built-in>;F:<NULL>;L:0;C:0;S:0;M:0x7f4ee211d018;E:0,LOC:64,R:64}# 0
"<built-in>"
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f4ee211d030;E:0,LOC:96,R:96}# 0
"<command-line>"
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f4ee211d030;E:0,LOC:96,R:96}{P:/usr/include/stdc-predef.h;F:<command-line>;L:1;C:0;S:1;M:0x7f4ee211d048;E:0,LOC:128,R:128}#
1 "/usr/include/stdc-predef.h" 1 3 4
{P:<command-line>;F:<NULL>;L:0;C:0;S:0;M:0x7f4ee211d060;E:0,LOC:258432,R:258432}#
0 "<command-line>" 2
{P:<stdin>;F:<NULL>;L:1;C:0;S:0;M:0x7f4ee211d078;E:0,LOC:258464,R:258464}# 1
"<stdin>"
It would be expected that -fno-debug-cpp disables previous -fdebug-cpp