public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gwhitneycom5 at pobox dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug preprocessor/108244] New: [12/13 Regression] Cannot preprocess standard <algorithm> header with -E -fdirectives-only
Date: Wed, 28 Dec 2022 16:48:03 +0000	[thread overview]
Message-ID: <bug-108244-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108244

            Bug ID: 108244
           Summary: [12/13 Regression] Cannot preprocess standard
                    <algorithm> header with -E -fdirectives-only
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gwhitneycom5 at pobox dot com
  Target Milestone: ---

Create a file `algoproblem.cxx` containing just:

```
#include <algorithm>
int main() { return 0; }
```

Now `g++-13 -E -fdirectives-only algoproblem.cxx` fails with:

```
In file included from /usr/include/c++/13/bits/stl_pair.h:60,
                 from /usr/include/c++/13/bits/stl_algobase.h:64,
                 from /usr/include/c++/13/algorithm:60,
                 from algoproblem.cxx:1:
/usr/include/c++/13/type_traits:2948:25: error: missing binary operator before
token "("
 2948 |                bool _Nothrow = noexcept(_S_conv<_Tp>(_S_get())),
      |
```

whereas `g++-12 -E -fdirectives-only algoproblem.cxx` runs to completion,
producing plausible output.

Context: I am running the build2 build system, which separates partial
preprocessing with `-E -fdirectives-only` from the main compilation. Thus,
build2 has broken when trying to switch to g++-13. I am running on an OpenSUSE
Tumbleweed linux installation, reasonably up-to-date, and `g++-13 --version`
reports:

```
g++-13 (SUSE Linux) 13.0.0 20221213 (experimental) [revision
0a43f7b1a73c8e3b9cefffe430274d0a3d6d3291]
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
```

             reply	other threads:[~2022-12-28 16:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-28 16:48 gwhitneycom5 at pobox dot com [this message]
2022-12-28 16:54 ` [Bug preprocessor/108244] " gwhitneycom5 at pobox dot com
2022-12-28 17:25 ` [Bug preprocessor/108244] [13 " pinskia at gcc dot gnu.org
2022-12-28 17:26 ` pinskia at gcc dot gnu.org
2022-12-28 17:27 ` pinskia at gcc dot gnu.org
2022-12-28 17:32 ` [Bug preprocessor/108244] [13 Regression] `pragma GCC diagnostic` and -E -fdirectives-only causes the preprocessor to become confused pinskia at gcc dot gnu.org
2022-12-29 19:45 ` lhyatt at gcc dot gnu.org
2022-12-29 21:34 ` lhyatt at gcc dot gnu.org
2022-12-30 17:24 ` lhyatt at gcc dot gnu.org
2023-01-06 10:27 ` [Bug preprocessor/108244] [13 Regression] `pragma GCC diagnostic` and -E -fdirectives-only causes the preprocessor to become confused since r13-1544-ge46f4d7430c52104 marxin at gcc dot gnu.org
2023-01-09 14:06 ` rguenth at gcc dot gnu.org
2023-01-11 19:14 ` pinskia at gcc dot gnu.org
2023-01-12  0:04 ` cvs-commit at gcc dot gnu.org
2023-01-12  0:07 ` lhyatt at gcc dot gnu.org
2023-10-30 21:03 ` lhyatt 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-108244-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).