public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/108244] New: [12/13 Regression] Cannot preprocess standard <algorithm> header with -E -fdirectives-only
@ 2022-12-28 16:48 gwhitneycom5 at pobox dot com
  2022-12-28 16:54 ` [Bug preprocessor/108244] " gwhitneycom5 at pobox dot com
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: gwhitneycom5 at pobox dot com @ 2022-12-28 16:48 UTC (permalink / raw)
  To: gcc-bugs

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.
```

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-10-30 21:03 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-28 16:48 [Bug preprocessor/108244] New: [12/13 Regression] Cannot preprocess standard <algorithm> header with -E -fdirectives-only gwhitneycom5 at pobox dot com
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

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).