This is the mail archive of the
mailing list for the GCC project.
Re: RFC/RFHelp: c-decl.c rewrite - almost but not quite
Gabriel Dos Reis <email@example.com> writes:
> Zack Weinberg <firstname.lastname@example.org> writes:
> | You may have guessed that I'm not at all enthusiastic about this
> | compile-time/run-time undefined behavior distinction.
> So, do you propose to reject
> extern int foo;
> void bar(void)
> if (foo)
> *(int*)0 = 89;
> It is a runtime undefined behaviour, not compile-time -- unless you
> can prove that any execution path makes foo true. (The same is true
> in C++ by the way).
Yes, actually, I think an implementation should be free to reject a
translation unit that merely has an execution path that must provoke
> I think you misunderstood what that locution is for. It is used in
> the very few cases where requiring an implementation to issue a
> diagnostic would lead to either a halting problem or excedingly
> advanced technology requirement. The number of occurances of that
> "ill-formed but no diagnostic is required" is astonishingly small.
I stand corrected.