public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug preprocessor/31869]  New: stringifying empty macros
@ 2007-05-08 19:31 truedfx at gentoo dot org
  2007-05-09  2:14 ` [Bug preprocessor/31869] " pinskia at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: truedfx at gentoo dot org @ 2007-05-08 19:31 UTC (permalink / raw)
  To: gcc-bugs

#include <stdio.h>

#define MKSTR(x) STR(x)
#define STR(x) #x
#define EMPTY /* nothing */

int main(void) {
    puts(MKSTR(.EMPTY.));
    puts(MKSTR(.EMPTY .));
}

Using gcc 4.1.2, configured with
../gcc-4.1.2/configure --prefix=$HOME/gcc --enable-languages=c,c++
--disable-multilib, on x86_64-pc-linux-gnu, this program prints out

..
..

rather than

..
. .

as I would expect.


-- 
           Summary: stringifying empty macros
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: truedfx at gentoo dot org


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
@ 2007-05-09  2:14 ` pinskia at gcc dot gnu dot org
  2007-05-09  4:01 ` neil at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-05-09  2:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2007-05-09 03:14 -------
I don't see a problem with this .. are two different tokens (.) so getting rid
of the space is ok here.


-- 


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
  2007-05-09  2:14 ` [Bug preprocessor/31869] " pinskia at gcc dot gnu dot org
@ 2007-05-09  4:01 ` neil at gcc dot gnu dot org
  2007-05-09 23:33 ` truedfx at gentoo dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: neil at gcc dot gnu dot org @ 2007-05-09  4:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from neil at gcc dot gnu dot org  2007-05-09 05:01 -------
The space is required by the standard.  Is this a regression?  I believe GCC
used to get this right but I could be wrong.


-- 


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
  2007-05-09  2:14 ` [Bug preprocessor/31869] " pinskia at gcc dot gnu dot org
  2007-05-09  4:01 ` neil at gcc dot gnu dot org
@ 2007-05-09 23:33 ` truedfx at gentoo dot org
  2007-12-28 20:59 ` truedfx at gentoo dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: truedfx at gentoo dot org @ 2007-05-09 23:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from truedfx at gentoo dot org  2007-05-10 00:33 -------
I see the same behaviour with gcc 3.3.6. I'm not able to check even older
versions for now.


-- 


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
                   ` (2 preceding siblings ...)
  2007-05-09 23:33 ` truedfx at gentoo dot org
@ 2007-12-28 20:59 ` truedfx at gentoo dot org
  2009-03-29 23:30 ` jsm28 at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: truedfx at gentoo dot org @ 2007-12-28 20:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from truedfx at gentoo dot org  2007-12-28 20:59 -------
Yes, gcc 2.95.3 got it right, the program used to keep the space:

..
. .


-- 


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
                   ` (3 preceding siblings ...)
  2007-12-28 20:59 ` truedfx at gentoo dot org
@ 2009-03-29 23:30 ` jsm28 at gcc dot gnu dot org
  2009-04-12 22:20 ` jsm28 at gcc dot gnu dot org
  2009-04-12 22:23 ` jsm28 at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-29 23:30 UTC (permalink / raw)
  To: gcc-bugs



-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |16620, 16989
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-29 23:30:21
               date|                            |


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
                   ` (4 preceding siblings ...)
  2009-03-29 23:30 ` jsm28 at gcc dot gnu dot org
@ 2009-04-12 22:20 ` jsm28 at gcc dot gnu dot org
  2009-04-12 22:23 ` jsm28 at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-12 22:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jsm28 at gcc dot gnu dot org  2009-04-12 22:20 -------
Subject: Bug 31869

Author: jsm28
Date: Sun Apr 12 22:20:02 2009
New Revision: 145989

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=145989
Log:
libcpp:
        PR preprocessor/31869
        * macro.c (stringify_arg): Handle NULL source token in padding
        token where previous padding token did not have source token with
        preceding whitespace.

gcc/testsuite:
        * gcc.dg/cpp/strify5.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/cpp/strify5.c
Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/libcpp/ChangeLog
    trunk/libcpp/macro.c


-- 


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


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

* [Bug preprocessor/31869] stringifying empty macros
  2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
                   ` (5 preceding siblings ...)
  2009-04-12 22:20 ` jsm28 at gcc dot gnu dot org
@ 2009-04-12 22:23 ` jsm28 at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-04-12 22:23 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2009-04-12 22:23 -------
Fixed for 4.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
      Known to work|                            |4.5.0
         Resolution|                            |FIXED
   Target Milestone|---                         |4.5.0


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


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

end of thread, other threads:[~2009-04-12 22:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-08 19:31 [Bug preprocessor/31869] New: stringifying empty macros truedfx at gentoo dot org
2007-05-09  2:14 ` [Bug preprocessor/31869] " pinskia at gcc dot gnu dot org
2007-05-09  4:01 ` neil at gcc dot gnu dot org
2007-05-09 23:33 ` truedfx at gentoo dot org
2007-12-28 20:59 ` truedfx at gentoo dot org
2009-03-29 23:30 ` jsm28 at gcc dot gnu dot org
2009-04-12 22:20 ` jsm28 at gcc dot gnu dot org
2009-04-12 22:23 ` jsm28 at gcc dot gnu 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).