This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: C constant expressions proposals


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]