public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp
@ 2023-10-24 18:51 zsojka at seznam dot cz
2023-10-24 19:04 ` [Bug preprocessor/111965] " pinskia at gcc dot gnu.org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2023-10-24 18:51 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
@ 2023-10-24 19:04 ` pinskia at gcc dot gnu.org
2023-10-24 19:05 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-24 19:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.7.0
Last reconfirmed| |2023-10-24
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed, seems broken since it was added in 4.7.0.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
2023-10-24 19:04 ` [Bug preprocessor/111965] " pinskia at gcc dot gnu.org
@ 2023-10-24 19:05 ` pinskia at gcc dot gnu.org
2023-10-24 19:06 ` pinskia at gcc dot gnu.org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-24 19:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Easy fix replace:
case OPT_fdebug_cpp:
cpp_opts->debug = 1;
break;
With:
case OPT_fdebug_cpp:
cpp_opts->debug = value;
break;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
2023-10-24 19:04 ` [Bug preprocessor/111965] " pinskia at gcc dot gnu.org
2023-10-24 19:05 ` pinskia at gcc dot gnu.org
@ 2023-10-24 19:06 ` pinskia at gcc dot gnu.org
2023-10-24 19:08 ` pinskia at gcc dot gnu.org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-24 19:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Yes it has been broken since it was added in r0-112466-g847e697a240e6d
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
` (2 preceding siblings ...)
2023-10-24 19:06 ` pinskia at gcc dot gnu.org
@ 2023-10-24 19:08 ` pinskia at gcc dot gnu.org
2023-10-27 12:26 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-10-24 19:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
https://gcc.gnu.org/pipermail/gcc-patches/2011-October/325728.html
I don't know if there should be a -fno-debug-cpp option. Maybe we should just
reject that ...
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
` (3 preceding siblings ...)
2023-10-24 19:08 ` pinskia at gcc dot gnu.org
@ 2023-10-27 12:26 ` rguenth at gcc dot gnu.org
2023-12-06 17:05 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2023-10-27 12:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #4)
> https://gcc.gnu.org/pipermail/gcc-patches/2011-October/325728.html
>
> I don't know if there should be a -fno-debug-cpp option. Maybe we should
> just reject that ...
Well, option compositing hygiene tells us to just allow it. Patch looks
obvious btw.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
` (4 preceding siblings ...)
2023-10-27 12:26 ` rguenth at gcc dot gnu.org
@ 2023-12-06 17:05 ` jakub at gcc dot gnu.org
2023-12-07 8:48 ` cvs-commit at gcc dot gnu.org
2023-12-07 9:36 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-12-06 17:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |jakub at gcc dot gnu.org
Status|NEW |ASSIGNED
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 56817
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56817&action=edit
gcc14-pr111965.patch
Full lightly tested patch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
` (5 preceding siblings ...)
2023-12-06 17:05 ` jakub at gcc dot gnu.org
@ 2023-12-07 8:48 ` cvs-commit at gcc dot gnu.org
2023-12-07 9:36 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-12-07 8:48 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
--- Comment #7 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:
https://gcc.gnu.org/g:8c088c4307dbb855596acb6366b0882e95d20b91
commit r14-6266-g8c088c4307dbb855596acb6366b0882e95d20b91
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu Dec 7 09:47:54 2023 +0100
c-family: Fix up -fno-debug-cpp [PR111965]
As can be seen in the second testcase, -fno-debug-cpp is actually
implemented the same as -fdebug-cpp and so doesn't turn the debugging
off.
The following patch fixes that.
2023-12-07 Andrew Pinski <pinskia@gmail.com>
Jakub Jelinek <jakub@redhat.com>
PR preprocessor/111965
gcc/c-family/
* c-opts.cc (c_common_handle_option) <case OPT_fdebug_cpp>: Set
cpp_opts->debug to value rather than 1.
gcc/testsuite/
* gcc.dg/cpp/pr111965-1.c: New test.
* gcc.dg/cpp/pr111965-2.c: New test.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug preprocessor/111965] -fno-debug-cpp does not disable -fdebug-cpp
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
` (6 preceding siblings ...)
2023-12-07 8:48 ` cvs-commit at gcc dot gnu.org
@ 2023-12-07 9:36 ` jakub at gcc dot gnu.org
7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2023-12-07 9:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111965
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Fixed now for GCC 14.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-12-07 9:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-24 18:51 [Bug preprocessor/111965] New: -fno-debug-cpp does not disable -fdebug-cpp zsojka at seznam dot cz
2023-10-24 19:04 ` [Bug preprocessor/111965] " pinskia at gcc dot gnu.org
2023-10-24 19:05 ` pinskia at gcc dot gnu.org
2023-10-24 19:06 ` pinskia at gcc dot gnu.org
2023-10-24 19:08 ` pinskia at gcc dot gnu.org
2023-10-27 12:26 ` rguenth at gcc dot gnu.org
2023-12-06 17:05 ` jakub at gcc dot gnu.org
2023-12-07 8:48 ` cvs-commit at gcc dot gnu.org
2023-12-07 9:36 ` jakub at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).