public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/60492] New: Using the L#param in a macro fails
@ 2014-03-10 19:17 jr at heisey dot org
  2014-03-10 19:18 ` [Bug preprocessor/60492] " jr at heisey dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jr at heisey dot org @ 2014-03-10 19:17 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60492

            Bug ID: 60492
           Summary: Using the L#param in a macro fails
           Product: gcc
           Version: 4.8.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jr at heisey dot org

#define DEFINE_XML_TOKEN_STRING(n, s) const char n##a[] = #s; const wchar_t
n##w[] = L#s;

//defines for tags
DEFINE_XML_TOKEN_STRING(CONFIG_ELM, config)

The preprocessor inserts a space resulting in 
L "config"
rather than
L"config"

First saw this on gcc on Windows.
[D:\Proj\Synaptics\tools]"d:\Program Files
(x86)\CodeBlocks.13\MinGW\bin\gcc.exe
" --version
gcc.exe (tdm-2) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Reproduced it on GCC 4.5.1 on Fedora.
[jrheisey@usu-fury CDCIApi]$ g++ --version
g++ (GCC) 4.5.1 20100924 (Red Hat 4.5.1-4)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-03-14  7:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-10 19:17 [Bug preprocessor/60492] New: Using the L#param in a macro fails jr at heisey dot org
2014-03-10 19:18 ` [Bug preprocessor/60492] " jr at heisey dot org
2014-03-10 21:13 ` jr at heisey dot org
2014-03-10 22:39 ` redi at gcc dot gnu.org
2014-03-11  2:17 ` duncan_roe at acslink dot net.au
2014-03-11  2:19 ` pinskia at gcc dot gnu.org
2014-03-14  7:10 ` jr at heisey dot 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).