public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/50387] New: Doesn't process "_Pragma" when expanding a token sequence for #include
@ 2011-09-13 20:32 schaub.johannes at googlemail dot com
2012-07-10 18:18 ` [Bug preprocessor/50387] " naesten at gmail dot com
2023-03-21 1:07 ` pinskia at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: schaub.johannes at googlemail dot com @ 2011-09-13 20:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50387
Bug #: 50387
Summary: Doesn't process "_Pragma" when expanding a token
sequence for #include
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schaub.johannes@googlemail.com
The following code works fine with Clang and as far as I can see, C++11
requires this to work (modulo the pragma's content interpretation):
#define GET(H) _Pragma("diagnostic push") <H>
#include GET(stdio.h)
The code I'm working on uses this feature to implement something and it would
be nice if GCC would support this too.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/50387] Doesn't process "_Pragma" when expanding a token sequence for #include
2011-09-13 20:32 [Bug preprocessor/50387] New: Doesn't process "_Pragma" when expanding a token sequence for #include schaub.johannes at googlemail dot com
@ 2012-07-10 18:18 ` naesten at gmail dot com
2023-03-21 1:07 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: naesten at gmail dot com @ 2012-07-10 18:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50387
Samuel Bronson <naesten at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |naesten at gmail dot com
--- Comment #1 from Samuel Bronson <naesten at gmail dot com> 2012-07-10 18:18:20 UTC ---
I think you forgot the "GCC " at the beginning of the pragma text?
Also, you forgot to show what happens when you attempt to do this, preferably
using a test header constructed for the purpose (to keep the testcase small and
self-contained). But perhaps adding "GCC " is all you need?
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug preprocessor/50387] Doesn't process "_Pragma" when expanding a token sequence for #include
2011-09-13 20:32 [Bug preprocessor/50387] New: Doesn't process "_Pragma" when expanding a token sequence for #include schaub.johannes at googlemail dot com
2012-07-10 18:18 ` [Bug preprocessor/50387] " naesten at gmail dot com
@ 2023-03-21 1:07 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-03-21 1:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=50387
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Simplified testcase:
```
#define GET(H) _Pragma("") <H>
#include GET(stdio.h)
```
Both MSVC and clang are able to handle this.
ICC rejects it for the same reason as GCC.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-21 1:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-13 20:32 [Bug preprocessor/50387] New: Doesn't process "_Pragma" when expanding a token sequence for #include schaub.johannes at googlemail dot com
2012-07-10 18:18 ` [Bug preprocessor/50387] " naesten at gmail dot com
2023-03-21 1:07 ` 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).