public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/107638] New: [13 Regression] options.h:239:36: error: token "." is not valid in preprocessor expressions
Date: Fri, 11 Nov 2022 15:08:17 +0000	[thread overview]
Message-ID: <bug-107638-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2022-11-11 15:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-11 15:08 danglin at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107638-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).