[cfe-commits] r55158 - in /cfe/trunk: include/clang/AST/ASTContext.h lib/AST/ASTContext.cpp lib/Sema/SemaDecl.cpp lib/Sema/SemaExpr.cpp

Eli Friedman eli.friedman at gmail.com
Sat Aug 23 23:38:29 PDT 2008

On Fri, Aug 22, 2008 at 11:47 AM, Daniel Dunbar <daniel at zuster.org> wrote:
> I believe this or a related commit is causing regressions in the LLVM test
> suite. My nightly tester (http://llvm.org/nightlytest/test.php?machine=308&night=7260)
> is showing errors in
> Benchmarks/Dhrystone/dry
> Benchmarks/Dhrystone/fldry
> Benchmarks/MallocBench/cfrac/cfrac
> Benchmarks/McCat/18-imp/imp
> and I minimized the cfrac failure to the following test case:
> --
> typedef unsigned short posit;
> extern void palloc();
> void palloc(posit size) {
> }
> --
> ddunbar at ddunbar2:cfrac$ clang Output/pops.E
> Output/pops.E:5:6: error: conflicting types for 'palloc'
> void palloc(posit size) {
>     ^
> Output/pops.E:3:13: error: previous declaration is here
> extern void palloc();
>            ^
> 2 diagnostics generated.
> --
> Can you investigate?

For the testcase in question, my code is doing the right thing here;
void f(short) and void f() are not compatible because short is a
promotable integer type.  Previously, we didn't check for that
restriction.  This issue is essentially just PR2586
(http://llvm.org/bugs/show_bug.cgi?id=2586); I think it's just a
matter of degrading the errors in Sema::MergeFunctionDecl to warnings,
although it's possible there are non-obvious issues with that


More information about the cfe-commits mailing list