gcc 2.8.1 on sun SunOS 5.5.1 Generic_103640-31 sun4u sparc SUNW,Ultra-Enterprise
Phil Edwards
pedwards@jaj.com
Mon Jan 31 13:10:00 GMT 2000
Sam Steingold <sds@gnu.org> writes:
> The appended file produces different output when compiled with gcc and
> when compiled with sun cc:
>
> $ gcc gcc-bug.c ; ./a.out
> On the first dhy of Christmhs my true love ghve to me
> h phrtridge in h pehr tree.
[snip]
> $ cc gcc-bug.c ; ./a.out
> "gcc-bug.c", line 63: warning: character constant too long
> "gcc-bug.c", line 63: warning: character constant too long
> On the first day of Christmas my true love gave to me
> a partridge in a pear tree.
[snip]
> #q#n+,/+k#;*+,/'r :'d*'3,}{w+K w'K:'+}e#';dq#'l q#'+d'K#!/+k#;\
> q#'r}eKK#}w'r}eKK{nl]'/#;#q#n'){)#}w'){){nl]'/+#n';d}rw' i;# ){nl]!/n{n#'; \
> r{#w'r nc{nl]'/#{l,+'K {rw' iK{;[{nl]'/w#q#\n\
> \
> n'wk nw' iwk{KK{nl]!/w{%'l##w#' i; :{nl]'/*{q#'ld;r'}{nlwb!/*de}'c ;;\
> {nl'-{}rw]'/+,}##'*}#nc,',#nw]'/+kd'+e}+;\
> #'rdq#w! nr'/ ') }+}{rl#'{n' ')# }'+}##(!!/")
Many of the winning entries of the International Obfuscated C Coding
Contest rely on older preprocessors. Including this one, IIRC.
I remember that I had to use '-traditional' when compiling the entry
that calculated pi by computing the area of its source code. You might
try -traditional or just -traditional-cpp.
It /is/ possible to eventually build this using gcc, though. It's one
of the few IOCCC entries I've kept. I think I was also using 2.8 then.
Phil
More information about the Gcc-bugs
mailing list