public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
@ 2022-11-11 15:08 danglin at gcc dot gnu.org
2022-11-11 16:25 ` [Bug c++/107638] " ppalka at gcc dot gnu.org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-11-11 15:08 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
Bug ID: 107638
Summary: [13 Regression] options.h:239:36: error: token "." is
not valid in preprocessor expressions
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: danglin at gcc dot gnu.org
CC: ppalka at gcc dot gnu.org
Target Milestone: ---
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
The following problem was introduced by commit
d0a492faa6478c99d325fa4a7ed2e5633cef7529:
g++ -std=c++11 -fno-PIE -c -DIN_GCC_FRONTEND -g -DIN_GCC -fno-exceptions
-
fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-W
cast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H
-I
. -Icp -I../../gcc/gcc -I../../gcc/gcc/cp -I../../gcc/gcc/../include
-I../../gcc
/gcc/../libcpp/include -I../../gcc/gcc/../libcody -I/opt/gnu64/gcc/gmp/include
-I../../gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd
-I../libdecn
umber -I../../gcc/gcc/../libbacktrace -I/opt/gnu64/gcc/gmp/include -o
cp/tree.o
-MT cp/tree.o -MMD -MP -MF cp/.deps/tree.TPo ../../gcc/gcc/cp/tree.cc
In file included from ../../gcc/gcc/tree.h:24,
from ../../gcc/gcc/cp/tree.cc:24:
./options.h:239:36: error: token "." is not valid in preprocessor expressions
239 | #define target_flags global_options.x_target_flags
| ^
./options.h:8725:25: note: in expansion of macro 'target_flags'
8725 | #define TARGET_GNU_LD ((target_flags & MASK_GNU_LD) != 0)
| ^~~~~~~~~~~~
../../gcc/gcc/config/pa/pa64-hpux.h:358:33: note: in expansion of macro
'TARGET_GNU_LD'
358 | #define SUPPORTS_INIT_PRIORITY (TARGET_GNU_LD ? 1 : 0)
| ^~~~~~~~~~~~~
../../gcc/gcc/cp/tree.cc:5039:5: note: in expansion of macro
'SUPPORTS_INIT_PRIORITY'
5039 | #if SUPPORTS_INIT_PRIORITY
| ^~~~~~~~~~~~~~~~~~~~~~
make[3]: *** [Makefile:1135: cp/tree.o] Error 1
make[3]: *** Waiting for unfinished jobs....
make[3]: Leaving directory '/home/dave/gnu/gcc/objdir64/gcc'
make[2]: *** [Makefile:4915: all-stage1-gcc] Error 2
make[2]: Leaving directory '/home/dave/gnu/gcc/objdir64'
make[1]: *** [Makefile:25469: stage1-bubble] Error 2
make[1]: Leaving directory '/home/dave/gnu/gcc/objdir64'
make: *** [Makefile:25822: bootstrap] Error 2
Fri Nov 11 09:17:16 EST 2022
On hppa64-hpux, we have the following define for SUPPORTS_INIT_PRIORITY:
#define SUPPORTS_INIT_PRIORITY (TARGET_GNU_LD ? 1 : 0)
The goal was to support the init_priority attribute with GNU ld and not
with HP ld.
The documentation doesn't indicate whether C statements are allowed
or not for SUPPORTS_INIT_PRIORITY.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
@ 2022-11-11 16:25 ` ppalka at gcc dot gnu.org
2022-11-13 9:04 ` jbglaw@lug-owl.de
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2022-11-11 16:25 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Ever confirmed|0 |1
Target Milestone|--- |13.0
Last reconfirmed| |2022-11-11
Status|UNCONFIRMED |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Whoops, sorry for the build breakage, I had wrongly assumed
SUPPORTS_INIT_PRIORITY is always a simple constant. Instead of trying to
statically exclude init_priority from the attribute table, I guess we should
just special case init_priority in the __has_attribute handling.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
2022-11-11 16:25 ` [Bug c++/107638] " ppalka at gcc dot gnu.org
@ 2022-11-13 9:04 ` jbglaw@lug-owl.de
2022-11-14 10:31 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: jbglaw@lug-owl.de @ 2022-11-13 9:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
Jan-Benedict Glaw <jbglaw@lug-owl.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jbglaw@lug-owl.de
--- Comment #2 from Jan-Benedict Glaw <jbglaw@lug-owl.de> ---
Seen also for --target=sparc-wrs-vxworks, sh-wrs-vxworks, powerpc-wrs-vxworks,
mips-wrs-vxworks, i686-wrs-vxworks.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
2022-11-11 16:25 ` [Bug c++/107638] " ppalka at gcc dot gnu.org
2022-11-13 9:04 ` jbglaw@lug-owl.de
@ 2022-11-14 10:31 ` redi at gcc dot gnu.org
2022-11-14 11:26 ` rguenth at gcc dot gnu.org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: redi at gcc dot gnu.org @ 2022-11-14 10:31 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |marxin at gcc dot gnu.org
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
*** Bug 107673 has been marked as a duplicate of this bug. ***
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
` (2 preceding siblings ...)
2022-11-14 10:31 ` redi at gcc dot gnu.org
@ 2022-11-14 11:26 ` rguenth at gcc dot gnu.org
2022-11-15 2:29 ` cvs-commit at gcc dot gnu.org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-11-14 11:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
` (3 preceding siblings ...)
2022-11-14 11:26 ` rguenth at gcc dot gnu.org
@ 2022-11-15 2:29 ` cvs-commit at gcc dot gnu.org
2022-11-15 14:44 ` jbglaw@lug-owl.de
2022-11-15 21:10 ` danglin at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-11-15 2:29 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:fce38b7d13ae625301571dcd84f3774ddaa6ed04
commit r13-4039-gfce38b7d13ae625301571dcd84f3774ddaa6ed04
Author: Patrick Palka <ppalka@redhat.com>
Date: Mon Nov 14 21:28:58 2022 -0500
c++: init_priority and SUPPORTS_INIT_PRIORITY [PR107638]
The commit r13-3706-gd0a492faa6478c for fixing the result of
__has_attribute(init_priority) causes a bootstrap failure on hppa64-hpux
due to assuming the macro SUPPORTS_INIT_PRIORITY expands to a simple
constant, but on this target the macro is defined as
#define SUPPORTS_INIT_PRIORITY (TARGET_GNU_LD ? 1 : 0)
(where TARGET_GNU_LD expands to something in terms of global_options)
which means we can't use the macro to conditionally exclude the entry
for init_priority when defining the cxx_attribute_table.
So instead of trying to exclude init_priority from the attribute table,
this patch just makes __has_attribute handle init_priority specially.
PR c++/107638
gcc/c-family/ChangeLog:
* c-lex.cc (c_common_has_attribute): Return 1 for init_priority
iff SUPPORTS_INIT_PRIORITY.
gcc/cp/ChangeLog:
* tree.cc (cxx_attribute_table): Don't conditionally exclude
the init_priority entry.
(handle_init_priority_attribute): Remove ATTRIBUTE_UNUSED.
Return error_mark_node if !SUPPORTS_INIT_PRIORITY.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
` (4 preceding siblings ...)
2022-11-15 2:29 ` cvs-commit at gcc dot gnu.org
@ 2022-11-15 14:44 ` jbglaw@lug-owl.de
2022-11-15 21:10 ` danglin at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: jbglaw@lug-owl.de @ 2022-11-15 14:44 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
--- Comment #5 from Jan-Benedict Glaw <jbglaw@lug-owl.de> ---
All my affected builds are restored.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug c++/107638] [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
` (5 preceding siblings ...)
2022-11-15 14:44 ` jbglaw@lug-owl.de
@ 2022-11-15 21:10 ` danglin at gcc dot gnu.org
6 siblings, 0 replies; 8+ messages in thread
From: danglin at gcc dot gnu.org @ 2022-11-15 21:10 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107638
John David Anglin <danglin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from John David Anglin <danglin at gcc dot gnu.org> ---
Thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2022-11-15 21:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 15:08 [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions danglin at gcc dot gnu.org
2022-11-11 16:25 ` [Bug c++/107638] " ppalka at gcc dot gnu.org
2022-11-13 9:04 ` jbglaw@lug-owl.de
2022-11-14 10:31 ` redi at gcc dot gnu.org
2022-11-14 11:26 ` rguenth at gcc dot gnu.org
2022-11-15 2:29 ` cvs-commit at gcc dot gnu.org
2022-11-15 14:44 ` jbglaw@lug-owl.de
2022-11-15 21:10 ` danglin 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).