[LLVMbugs] [Bug 6702] Wrong scoping for function parameter names?
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Mar 25 09:33:05 PDT 2010
http://llvm.org/bugs/show_bug.cgi?id=6702
Douglas Gregor <dgregor at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #2 from Douglas Gregor <dgregor at apple.com> 2010-03-25 11:33:05 CDT ---
Nevermind! It's a GCC bug, which EDG is emulating. Turning on EDG's strict mode
confirms that Clang's behavior is indeed correct. We do not attempt to emulate
GCC's behavior, since it's potentially dangerous:
typedef double a;
void f(int a, int b = sizeof(a)) ;
here, GCC will give b a default argument value of sizeof(double). Clang (and
EDG in strict mode) correctly reject it.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list