From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "ozan s. yigit" Message-ID: <4da3d9af.0203150929.1d3154d2@posting.google.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit References: <87adtj7yyl.fsf@becket.becket.net>, <4da3d9af.0203131248.60d6899e@posting.google.com>, <3C914E64.D5D00447@null.net> Subject: Re: macro fun [Re: [9fans] plan or side effect] Date: Fri, 15 Mar 2002 17:48:57 +0000 Topicbox-Message-UUID: 68162f0c-eaca-11e9-9e20-41e7f4b1d025 Douglas A. Gwyn writes: > > i'll let you figure out what t.c trivially contains to make a soup > > with the "optimized" macro, thanks to simple textual substitution. > > Is t.c a strictly conforming program? If not, you got what you asked > for. according to gcc, it is strictly conforming. it compiles perfectly. here is more strict version: bent!oz| gcc -Wall -ansi -pedantic -o t t.c bent!oz| ./t hello boyd! now, with -O bent!oz| gcc -O -Wall -ansi -pedantic -o t t.c t.c:4: parse error before `__extension__' this is absolute crap. here is t.c. so obvious, i'm surprised you of all people had to comment. #include #include extern char *strcpy(char *, const char *); int main(int argc, char **argv) { char buf[10]; strcpy(buf, "hello boyd!"); printf("%s\n", buf); return 0; } oz --- complexity is its own petard. -- anon oz@cs.yorku.ca || www.cs.yorku.ca/~oz