Article View: comp.std.c
Article #671typedef/old-style argument conflict question
From: Richard O'Keefe
Date: Sat, 07 Oct 1989 13:20
Date: Sat, 07 Oct 1989 13:20
15 lines
859 bytes
859 bytes
I have a program where, because of its development over the years,
the following pattern occurred:
/* in an included header file */
typedef char *str;
/* elsewhere */
void make_table(len, str)
int len;
char *str;
I first discovered this when GCC complained about a syntax error near "str".
I don't want to defend the practice of using typedef names as arguments; it
really wasn't intentional. My question is simply whether this code is
legal in the current ANSI draft.
Technical Details
Message-ID:
<2324@munnari.oz.au>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!cs.mu.oz.au!okShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!munnari.oz.au!cs.mu.oz.au!ok From: ok@cs.mu.oz.au (Richard O'Keefe) Newsgroups: comp.std.c Subject: typedef/old-style argument conflict question Keywords: old-style function header, typedef name as argument Message-ID: <2324@munnari.oz.au> Date: 7 Oct 89 13:20:52 GMT Sender: news@cs.mu.oz.au Lines: 15