http://llvm.org/bugs/show_bug.cgi?id=10158
Summary: clang fails to compile binutils gold
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: [email protected]
ReportedBy: [email protected]
CC: [email protected], [email protected]
While trying to compile binutils gold with clang, I encountered the following
problematic C++ code:
[~]> cat script.ii
namespace gold
{
extern "C" {
extern void
yyerror(void* closure, const char*);
};
}
using namespace gold;
extern "C" void
yyerror(void* closurev, const char* message)
{
}
extern "C" struct Version_expression_list*
version_script_push_lang(void* closurev, const char* lang, int langlen)
{
{
char* buf = new char[langlen + 100];
yyerror(closurev, buf);
}
}
[~]> clang++ -c script.ii
script.ii:18:7: error: call to 'yyerror' is ambiguous
yyerror(closurev, buf);
^~~~~~~
script.ii:5:1: note: candidate function
yyerror(void* closure, const char*);
^
script.ii:10:1: note: candidate function
yyerror(void* closurev, const char* message)
^
1 error generated.
Where as gcc does not complain:
[~]> g++ -c script.ii
[~]>
--
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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs