public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/102790] New: Inactive ifdef block is checked on content validity
@ 2021-10-15 20:09 mykola.dolhyi at avid dot com
2021-10-15 20:18 ` [Bug preprocessor/102790] " pinskia at gcc dot gnu.org
2021-10-15 20:23 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: mykola.dolhyi at avid dot com @ 2021-10-15 20:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102790
Bug ID: 102790
Summary: Inactive ifdef block is checked on content validity
Product: gcc
Version: 11.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: mykola.dolhyi at avid dot com
Target Milestone: ---
Even though expression inside inactive preprocessor #if block may not be a
valid C code, it should not fail compilation
Minimal example that trigger error:
~~~
#if 0
foo // compiles just fine
#endif
#if 0
§bar // will cause an error
#endif
~~~
GCC 9.4 compiles the example just fine, 10.1 fails, likely linked with changes
on gcc support for extended characters in identifiers.
Output of GCC 11.2:
~~~
<source>:6:1: error: extended character § is not valid in an identifier
6 | §bar // will cause an error
| ^
~~~
"-finput-charset=UTF-8 -fextended-identifiers" flags do not affect.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/102790] Inactive ifdef block is checked on content validity
2021-10-15 20:09 [Bug preprocessor/102790] New: Inactive ifdef block is checked on content validity mykola.dolhyi at avid dot com
@ 2021-10-15 20:18 ` pinskia at gcc dot gnu.org
2021-10-15 20:23 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-15 20:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102790
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail|10.1.0 |
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
GCC 10 is correct based on the C and C++ standards.
There are other bugs filed about this exact thing but not based on extended
identifiers.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/102790] Inactive ifdef block is checked on content validity
2021-10-15 20:09 [Bug preprocessor/102790] New: Inactive ifdef block is checked on content validity mykola.dolhyi at avid dot com
2021-10-15 20:18 ` [Bug preprocessor/102790] " pinskia at gcc dot gnu.org
@ 2021-10-15 20:23 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-10-15 20:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102790
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |DUPLICATE
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 62086 (and others).
*** This bug has been marked as a duplicate of bug 11064 ***
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-10-15 20:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-15 20:09 [Bug preprocessor/102790] New: Inactive ifdef block is checked on content validity mykola.dolhyi at avid dot com
2021-10-15 20:18 ` [Bug preprocessor/102790] " pinskia at gcc dot gnu.org
2021-10-15 20:23 ` pinskia 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).