C constant expressions proposals

Robert Dewar dewar@gnat.com
Wed Aug 18 13:43:00 GMT 2004


Mark Mitchell wrote:

> Joseph S. Myers wrote:
> 
>> It's the job of the front end to reject invalid code and pass down 
>> valid code to the next level.  It's the jobs of the compiler to pass 
>> only valid code to the assembler unless there is something invalid an 
>> asm statement or similar.
>>
> I strongly agree.
> In fact, I consider all diagnostic outputs other than "internal error",
> "out of memory", etc. from anything other than the front end to be bugs. 

I think that's a reasonable viewpoint, though it can  be tricky to
implement in some cases. Just recently in GNAT, quite a bit of extra
circuitry was added to detect duplicate external names so that the
assembler would not complain.

Incidentally, Mark, your general principle of course does not apply
to link time, where indeed diagnostics outputs can legitimately
occur.




More information about the Gcc mailing list