This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/31869] New: stringifying empty macros


#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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]