Article View: gnu.gcc.help
Article #51232what does -traditional do?
From: Marty Leisner x71348
Date: Fri, 18 Jun 1993 03:29
Date: Fri, 18 Jun 1993 03:29
40 lines
2150 bytes
2150 bytes
I'm confused what -traditional is supposed to do...
I was under the impression it rejects function
prototypes and acts like a K&R C compiler...
2.3.3 and 2.4.3 don't seem to care...
I wrote a little sample program (tmp.c)
foo(int a, int b)
{
return 5;
}
main(int argc, char **argv)
{
printf("%d\n", foo());
}
leisner@annapurna$ cc tmp.c
"tmp.c", line 1: syntax error at or near type word "int"
"tmp.c", line 6: syntax error at or near type word "int"
leisner@annapurna$ gcc tmp.c
tmp.c: In function `main':
tmp.c:9: too few arguments to function `foo'
leisner@annapurna$ gcc -v -traditional tmp.c
Reading specs from /usr/gnu/lib/gcc-lib/sparc/2.4.3/specs
gcc version 2.4.3
/usr/gnu/lib/gcc-lib/sparc/2.4.3/cpp -lang-c -v -undef -D__GNUC__=2 -Dsparc -Dsun -Dunix -D__GCC_NEW_VARARGS__ -D__sparc__ -D__sun__ -D__unix__ -D__GCC_NEW_VARARGS__ -D__sparc -D__sun -D__unix -D__GCC_NEW_VARARGS__ -traditional tmp.c /usr/tmp/cca17424.i
GNU CPP version 2.4.3 (sparc)
/usr/gnu/lib/gcc-lib/sparc/2.4.3/cc1 /usr/tmp/cca17424.i -quiet -dumpbase tmp.c -traditional -version -o /usr/tmp/cca17424.s
GNU C version 2.4.3 (sparc) compiled by GNU C version 2.4.3.
tmp.c: In function `main':
tmp.c:9: too few arguments to function `foo'
--
Marty Leisner leisner@eso.mc.xerox.com leisner.henr801c@xerox.com
"People cannot be managed. Inventories can be managed, but people must be led"
-- H. Ross Perot
Technical Details
Message-ID:
<1993Jun18.032920.1660@spectrum.xerox.com>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!concert!news-feed-1.peachnet.edu!bogus.sura.net!udel!rochester!rocksanne!hydrus!leisnerShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,928e3dae2b969bde,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-06-17 23:13:31 PST Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!decwrl!concert!news-feed-1.peachnet.edu!bogus.sura.net!udel!rochester!rocksanne!hydrus!leisner From: leisner@hydrus (Marty Leisner x71348 ) Subject: what does -traditional do? Message-ID: <1993Jun18.032920.1660@spectrum.xerox.com> Sender: news@spectrum.xerox.com Reply-To: leisner@eso.mc.xerox.com Organization: Xerox X-Newsreader: TIN [version 1.2 PL0] Date: Fri, 18 Jun 1993 03:29:20 GMT Lines: 41