From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Haertel Message-Id: <200203151840.g2FIeZI02011@ducky.net> To: 9fans@cse.psu.edu Subject: Re: macro fun [Re: [9fans] plan or side effect] In-Reply-To: <4da3d9af.0203150929.1d3154d2@posting.google.com> Date: Fri, 15 Mar 2002 10:40:35 -0800 Topicbox-Message-UUID: 68255d24-eaca-11e9-9e20-41e7f4b1d025 >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; > } This is not strictly conforming. From the C89 standard, section 4.1.6, "Use of Library Functions": "Any function declared in a header may additionally be implemented as a macro defined in the header, so a library function should not be declared explicitly if its header is included."