https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77410

            Bug ID: 77410
           Summary: macro reference supplied as macro reference argument
                    is not expanded
           Product: gcc
           Version: 5.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: af804 at bfn dot org
  Target Milestone: ---

Created attachment 39516
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=39516&action=edit
utl1.c - demonstrates macro expansion problem

linux (built from source)
kernel 3.18.1
Target: x86_64-unknown-linux-gnu
Configured with: /home/jhart/temp5/gcc-5.3.0/configure --prefix=/usr
--enable-languages=c,c++,fortran --disable-multilib
Thread model: posix
gcc version 5.3.0 (GCC)

to compile : gcc utl1.c -o utl1.o

message {
utl1.c:5:6: error: conflicting types for 'MDNMx'
 void MDNMx(void);
      ^
utl1.c:3:8: note: previous declaration of 'MDNMx' was here
 int m1(MDNM)(void);
        ^
utl1.c:2:18: note: in definition of macro 'm1'
 #define m1(mdnm) mdnm##x
}

MDNM macro is not expanded for m1 macro reference
if utl1 is used in place of MDNM macro reference in m1 reference argument,
   conflict report is correct

Reply via email to