[LLVMbugs] [Bug 9316] New: block scope extern function declaration not receiving external linkage
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Feb 24 10:34:08 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=9316
Summary: block scope extern function declaration not receiving
external linkage
Product: clang
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P
Component: C++
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: chandlerc at gmail.com
CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com
% cat t.cc
extern "C" {
namespace {
class X {
int f() {
extern int puts(const char* s);
return puts("help!");
}
};
}
}
% clang -fsyntax-only t.cc
% ./third_party/llvm/crosstool/unstable/clang/bin/clang -fsyntax-only t.cc
t.cc:8:18: warning: function 'puts' has internal linkage but is not defined
extern int puts(const char* s);
^
t.cc:9:14: note: used here
return puts("help!");
^
1 warning generated.
My reading of the standard says that 'puts' should receive external linkage.
--
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