Article View: gnu.gcc.bug
Article #6142macros handled wrong??
From: Hugh Sasse
Date: Thu, 18 Apr 1996 00:00
Date: Thu, 18 Apr 1996 00:00
27 lines
993 bytes
993 bytes
The following short program:
/* To see what happens about macros involving chars */
#include <stdio.h>
#define OUTPUT(a) putchar('a')
main(argc, argv)
int argc;
char *argv[];
{
OUTPUT(x);
return(0);
};
produces the output
a
under gcc but
x
under Sun's Solaris 1.1 (Sunos 4.1.3) cc compiler.
This means that /usr/include/ioccom.h will be interpreted differently
for these compilers, in particular the definition:
#define _IOW(x,y,t) (_IOC_IN|((sizeof(t)&_IOCPARM_MASK)<<16)|('x'<<8)|y)
How should I proceed with this?
Hugh
hgs@dmu.ac.uk
Technical Details
Message-ID:
<4l54r8$sd9@macondo.dmu.ac.uk>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113d02,538a37a34e377ac8,start X-Google-Attributes: gid113d02,public From: hgs@dmu.ac.uk (Hugh Sasse) Subject: macros handled wrong?? Date: 1996/04/18 Message-ID: <4l54r8$sd9@macondo.dmu.ac.uk> X-Deja-AN: 150937906 organization: De Montfort University, Leicester, UK newsgroups: gnu.gcc.bug summary: gcc-2.7.2 may be handling macros wrongly