public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dev-zero at gentoo dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug preprocessor/95889] __has_include evaluated even if disabled (with cpp in traditional-mode) Date: Fri, 24 Jul 2020 10:34:17 +0000 [thread overview] Message-ID: <bug-95889-4-RoDVAEigVS@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-95889-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95889 Tiziano Müller <dev-zero at gentoo dot org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|10.1.0 |10.2.0 Summary|corrupt size vs. prev_size |__has_include evaluated |and hang when using |even if disabled (with cpp |__has_include with |in traditional-mode) |-traditional-cpp | Known to work| |9.3.0 --- Comment #2 from Tiziano Müller <dev-zero at gentoo dot org> --- Since the ICE is gone in gcc-10.2, there is only the second issue left: __has_include is evaluated even though it occurs in a "disabled region" when running cpp in traditional mode. This breaks building some Fortran packages, even when they guard the __has_include stmt with a `#if defined __has_include` as per the documentation. test2.h: #if 0 #if (__has_include(<foo.h>)) #endif #endif $ ./install/gcc-10.2.0/bin/cpp -traditional-cpp test2.h # 1 "test2.h" # 1 "<built-in>" # 1 "<command-line>" # 31 "<command-line>" # 1 "/usr/include/stdc-predef.h" 1 3 4 # 17 "/usr/include/stdc-predef.h" 3 4 # 32 "<command-line>" 2 # 1 "test2.h" test2.h:3: error: operator "__has_include" requires a header-name 3 | #if (__has_include(<foo.h>)) |
next prev parent reply other threads:[~2020-07-24 10:34 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-06-25 7:06 [Bug preprocessor/95889] New: corrupt size vs. prev_size and hang when using __has_include with -traditional-cpp dev-zero at gentoo dot org 2020-06-25 7:22 ` [Bug preprocessor/95889] " dev-zero at gentoo dot org 2020-07-24 10:34 ` dev-zero at gentoo dot org [this message] 2020-07-28 7:56 ` [Bug preprocessor/95889] __has_include evaluated even if disabled (with cpp in traditional-mode) tm@dev-zero.ch 2020-07-29 8:13 ` [Bug preprocessor/95889] [10 regression] __has_include broken with -traditional-cpp (and therefore with Fortran) tm@dev-zero.ch 2020-07-29 12:53 ` nathan at gcc dot gnu.org 2020-07-29 15:01 ` nathan 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-95889-4-RoDVAEigVS@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: linkBe 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).