[cfe-dev] K&R style argument lists and the type system

Eli Friedman eli.friedman at gmail.com
Mon Aug 25 17:01:06 PDT 2008

On Mon, Aug 25, 2008 at 4:27 PM, Neil Booth <neil at daikokuya.co.uk> wrote:
> Eli Friedman wrote:-
>> Consider the following testcase:
>> int a(int);
>> int a() {return 0;}
>> This is a constraint violation per C99.
> What type are you giving a()?  Since it doesn't have a well-defined
> type according to the standard, I would have thought "erroneous type"
> or somesuch would be appropriate.  Assuming you don't wish to give
> meaning to all erroneous constructs (some you might as an extension
> or relaxation of course) those without meaning must be flagged as
> not having concrete meaning in some way to prevent later bogus
> diagnostics and analyses, if nothing else.

The issue is that we aren't detecting it as an error at the moment,
and it's not completely clear where the best place is to check for it.


More information about the cfe-dev mailing list