https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83584

--- Comment #12 from Keith Thompson <Keith.S.Thompson at gmail dot com> ---
Andrew:

In my opinion, such conversions have undefined behavior (simply because
the standard does not define their behavior), but they are not forbidden.

The "-pedantic" and "-pedantic-errors" options, as I understand their
description, cause gcc to produce all diagnostic required by the C
standard. The only required diagnostics are for (a) #error directives,
(b) violations of syntax rules, and (c) violations of constraints.

Is my understanding correct?

If so, what syntax rule or constraint is violated by the program in
the description?

For example, (void*)1.0 violates the constraint in N1570 6.5.4 p4.

(I'll note in passing, without claiming that it's directly relevant,
that "clang -c -std=c11 -pedantic-errors" does not produce a diagnostic.)

This is not a duplicate of #11234, it's the opposite. #11234 complains
that a diagnostic is not produced; this bug report complains that it does.

I don't want to get into an editing war, so I'll leave the status as it
is for now.

Reply via email to