[LLVMbugs] [Bug 4350] New: clang mishandles the format printf attribute

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Tue Jun 9 07:40:45 PDT 2009


http://llvm.org/bugs/show_bug.cgi?id=4350

           Summary: clang mishandles the format printf attribute
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Semantic Analyzer
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: bagnara at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=3074)
 --> (http://llvm.org/bugs/attachment.cgi?id=3074)
Patch fixing the problem

When clang 72105 parses

#include <stdarg.h>
extern int vprintf(const char*, va_list);

it erroneously produces the invalid format printf attribute

extern int vprintf(const char*, va_list)
  __attribute__ ((__format__ (printf, 1, 2)));

instead of

extern int vprintf(const char*, va_list)
  __attribute__ ((__format__ (printf, 1, 0)));

The attached patch fixes the problem.


-- 
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