[LLVMbugs] [Bug 11681] New: Problem with glibc headers and -D_FORTIFY_SOURCE=2
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Dec 30 13:34:52 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11681
Bug #: 11681
Summary: Problem with glibc headers and -D_FORTIFY_SOURCE=2
Product: clang
Version: trunk
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: ismail at namtrac.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7821
--> http://llvm.org/bugs/attachment.cgi?id=7821
Preprocessed source code
idoenmez at havana:~> cat t.c
#include <stdio.h>
extern int asprintf (char **, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
idoenmez at havana:~> clang -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
-D_GNU_SOURCE -c -save-temps t.c
In file included from t.c:1:
t.c:3:37: error: expected parameter declarator
extern int __asprintf_chk (char **, 2 - 1, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
^
t.c:3:37: error: expected ')'
t.c:3:27: note: to match this '('
extern int __asprintf_chk (char **, 2 - 1, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
^
t.c:3:12: error: conflicting types for '__asprintf_chk'
extern int __asprintf_chk (char **, 2 - 1, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
^
/usr/include/bits/stdio2.h:133:12: note: previous declaration is here
extern int __asprintf_chk (char **__restrict __ptr, int __flag,
^
In file included from t.c:1:
t.c:3:78: error: 'format' attribute parameter 2 is out of bounds
extern int __asprintf_chk (char **, 2 - 1, const char *, ...)
__attribute__((__format__(__printf__,2,3)));
^
~
4 errors generated.
Preprocessed source code is attached.
--
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