[cfe-commits] r66301 - in /cfe/trunk: include/clang/Basic/DiagnosticSemaKinds.def lib/Sema/SemaDecl.cpp test/Sema/function-redecl.c test/Sema/knr-def-call.c

Neil Booth neil at daikokuya.co.uk
Fri Mar 6 19:48:01 PST 2009

Douglas Gregor wrote:-

> Author: dgregor
> Date: Fri Mar  6 16:43:54 2009
> New Revision: 66301
> URL: http://llvm.org/viewvc/llvm-project?rev=66301&view=rev
> Log:
> Implement GNU C semantics for K&R function definitions that follow a
> prototype of the same function, where the promoted parameter types in
> the K&R definition are not compatible with the types in the
> prototype. Fixes PR2821.

You seem to imply this is something that GCC is doing itself; I
don't believe that's true.  The only thing I recall being undesirable
about GCC's handling of K&R prototypes was that it didn't diagnose
*enough* undefined behaviour that was easily diagnosable.  I think
EDG diagnosed those extra cases.


More information about the cfe-commits mailing list