public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2
@ 2015-01-12 22:45 joel at gcc dot gnu.org
2015-01-12 22:50 ` [Bug preprocessor/64576] " pinskia at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-12 22:45 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64576
Bug ID: 64576
Summary: Preprocessor Error With 5.0 not with 4.9.2
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: preprocessor
Assignee: unassigned at gcc dot gnu.org
Reporter: joel at gcc dot gnu.org
Created attachment 34431
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34431&action=edit
Cut down example showing error
The attached example is based on code that has compiled fine for about 15
years.
$ ~/test-gcc/install-head/bin/powerpc-rtems4.11-gcc -meabi -mcpu=603e
-msdata=sysv -O2 -c b1.c
b1.c:1:36: error: '#' is not followed by a macro parameter
#define SETBAT_ASM(batu, batl, u, l)\
^
The macro may have issues but it gcc has been happy with it for a LONG time. :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/64576] Preprocessor Error With 5.0 not with 4.9.2
2015-01-12 22:45 [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2 joel at gcc dot gnu.org
@ 2015-01-12 22:50 ` pinskia at gcc dot gnu.org
2015-01-12 23:03 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2015-01-12 22:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64576
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Try a space between the macro argument name and the ".
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/64576] Preprocessor Error With 5.0 not with 4.9.2
2015-01-12 22:45 [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2 joel at gcc dot gnu.org
2015-01-12 22:50 ` [Bug preprocessor/64576] " pinskia at gcc dot gnu.org
@ 2015-01-12 23:03 ` jakub at gcc dot gnu.org
2015-01-13 21:37 ` joel at gcc dot gnu.org
2015-01-13 22:14 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-12 23:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64576
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |jakub at gcc dot gnu.org
Resolution|--- |INVALID
--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 4.9 behaves the same way with -std=c11, GCC 5 behaves the old way with
-std=c99. -std=c11 turns on unicode literals, i.e. u"str", U"str" and u8"str".
So for #u"str" you really need to put there whitespace, so that it isn't
parsed as # followed by u"str" string literal.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/64576] Preprocessor Error With 5.0 not with 4.9.2
2015-01-12 22:45 [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2 joel at gcc dot gnu.org
2015-01-12 22:50 ` [Bug preprocessor/64576] " pinskia at gcc dot gnu.org
2015-01-12 23:03 ` jakub at gcc dot gnu.org
@ 2015-01-13 21:37 ` joel at gcc dot gnu.org
2015-01-13 22:14 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: joel at gcc dot gnu.org @ 2015-01-13 21:37 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64576
--- Comment #3 from Joel Sherrill <joel at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #2)
> GCC 4.9 behaves the same way with -std=c11, GCC 5 behaves the old way with
> -std=c99. -std=c11 turns on unicode literals, i.e. u"str", U"str" and
> u8"str".
> So for #u"str" you really need to put there whitespace, so that it isn't
> parsed as # followed by u"str" string literal.
Thanks for the explanation. I was posting that -std=c99 appeared to have an
impact and collided with your much better explanation.
Is this a change in the default language version for gcc?
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug preprocessor/64576] Preprocessor Error With 5.0 not with 4.9.2
2015-01-12 22:45 [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2 joel at gcc dot gnu.org
` (2 preceding siblings ...)
2015-01-13 21:37 ` joel at gcc dot gnu.org
@ 2015-01-13 22:14 ` jakub at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2015-01-13 22:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64576
--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Sure, see http://gcc.gnu.org/gcc-5/changes.html , the default changed to
-std=gnu11 from -std=gnu89.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-01-13 22:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-12 22:45 [Bug preprocessor/64576] New: Preprocessor Error With 5.0 not with 4.9.2 joel at gcc dot gnu.org
2015-01-12 22:50 ` [Bug preprocessor/64576] " pinskia at gcc dot gnu.org
2015-01-12 23:03 ` jakub at gcc dot gnu.org
2015-01-13 21:37 ` joel at gcc dot gnu.org
2015-01-13 22:14 ` jakub 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).