Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Error messages Date: Thu, 16 Jul 2015 18:24:54 -0700 Organization: None to speak of Lines: 32 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="22937"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18Yj92skAtuT3bNGntyzQah" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:LB6E2Qqmqw9rQxrXfQFpAbWhjwY= sha1:EgUFKQN0UgGvG2SYfRQEUjbXml4= Xref: csiph.com comp.lang.c:65748 Richard Heathfield writes: > On 17/07/15 01:36, jacobnavia wrote: > > > >> As far as I can see, we can never have two unknown identifiers separated >> by white space in a legal C program. >> >> Is that correct? > > I believe so, yes. This: void func(struct foo param); seems to be legal but useless. gcc warns: c.c:1: warning: 'struct foo' declared inside parameter list c.c:1: warning: its scope is only this definition or declaration, which is probably not what you want As far as I can tell there's no legal way to define or call func. Since the motivation was to generate a diagnostic, and the above declaration, even if it's legal (I'm not sure it is) certainly deserves a diagnostic, I don't think that's a problem. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"