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