Article View: gnu.gcc.bug
Article #2444Are you supposed to be able to #define(a) ('a') and have a replaced
From: John C Schultz
Date: Thu, 23 Mar 1989 23:34
Date: Thu, 23 Mar 1989 23:34
23 lines
1209 bytes
1209 bytes
I just got SC 6.1 from the net and much to my suprise gcc would not
compile it while SUN OS3.5 cc would.
A little tracking produced the problem in:
**********************************************************************
#define ctrl(a) ('a'&037)
used as:
switch (ch)
case ctrl(r):
break;
case ctrl(z):
break;
**********************************************************************
I would say that this is not supposed to compile yet SUN cc does OK while
GCC doesn't. Do wiser minds have comments?
--
john c. schultz schultz@3M.Com ..!uiucuxc!mmm!schultz (612) 733-4047
3M Center, Bldg 518-1-1, St. Paul, MN 55144-1000
The opinions expressed herein are, as always, my own and not 3M's.
Technical Details
Message-ID:
<1245@mmm.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!indri!nic.MR.NET!umn-cs!mmm!schultzShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!indri!nic.MR.NET!umn-cs!mmm!schultz
From: schultz@mmm.UUCP (John C Schultz)
Newsgroups: gnu.gcc.bug
Subject: Are you supposed to be able to #define(a) ('a') and have a replaced
Keywords: cc gcc
Message-ID: <1245@mmm.UUCP>
Date: 23 Mar 89 23:34:14 GMT
Distribution: usa
Organization: 3M Engineering Systems & Technology Lab, St. Paul MN
Lines: 23