[LLVMbugs] [Bug 9203] New: Warning about struct tag argument being "visible outside of this function"

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Fri Feb 11 15:12:26 PST 2011


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

           Summary: Warning about struct tag argument being "visible
                    outside of this function"
           Product: clang
           Version: trunk
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: tjw at omnigroup.com
                CC: llvmbugs at cs.uiuc.edu


Compiling this with clang (r125414):


#import <Foundation/NSObject.h>

@interface NSObject(Category)
- (BOOL)appendXML:(struct _OFXMLBuffer *)xml;
@end


now produces a warning that it didn't before.

struct-tag.m:4:27: warning: declaration of 'struct _OFXMLBuffer' will not be
visible outside of this function
- (BOOL)appendXML:(struct _OFXMLBuffer *)xml;

This is easily fixable by #import'ing the header that has a typedef for this
struct, but it has never produced a warning before and seems iffy to me. I'm
not enough of an expert on the C spec to say whether this is a regression or a
new correct behavior, though.

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