[LLVMdev] Is this a bug in clang?

Joerg Sonnenberger joerg at britannica.bec.de
Wed Apr 20 04:44:00 PDT 2011


On Wed, Apr 20, 2011 at 12:02:26PM +0200, Joe Armstrong wrote:
> I still think that in the cases where clang/gcc can detect undefined behavior
> they should absolutely refuse to compile the programs. i + i++ is undefined
> value, both clang an gcc compile this without any moral qualms - no warnings -
> nothing - complete psychopathic behavior :-)

At least GCC 4.4.5 does generate a warning here.

Joerg



More information about the llvm-dev mailing list