🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.bug
Article #2695

Possible bug 1.35

#2695
From: Tom Friedel
Date: Tue, 30 May 1989 01:52
35 lines
915 bytes
The following program produces differemt results with gcc and
the 2.0.1 386/ix C compiler


#define ctl(a) ('a'&037)

main()
{
printf( "%d\n" , (int) ctl(a) );
printf( "%d\n" , (int) ctl(b) );
printf( "%d\n" , (int) ctl(c) );
printf( "%d\n" , (int) ctl(d) );
}


cc 
1
2
3
4


gcc
1
1
1
1

As the above #define construct is used ny the sc spread sheet, I 
assume someone has already pointed this out.


Tom Friedel             Public Access Unix BBS          
tpf@prism.gatech.edu    ...gatech!emory!jdyx!tpf          
(404) 320-7624          (404) 321-5020                  
Technical Details
Message-ID: <256@jdyx.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!emory!iccdev!jdyx!tpf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!gatech!emory!iccdev!jdyx!tpf
From: tpf@jdyx.UUCP (Tom Friedel)
Newsgroups: gnu.gcc.bug
Subject: Possible bug 1.35
Message-ID: <256@jdyx.UUCP>
Date: 30 May 89 01:52:25 GMT
Distribution: usa
Organization: JDyx Enterprises (Atlanta GA)
Lines: 35