[LLVMbugs] [Bug 4990] New: 'unavailable' attribute documented as error but is only warning

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Sep 16 01:00:28 PDT 2009


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

           Summary: 'unavailable' attribute documented as error but is only
                    warning
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Documentation
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: edwintorok at gmail.com
                CC: llvmbugs at cs.uiuc.edu


http://clang.llvm.org/docs/LanguageExtensions.html

void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is
an error


However clang diagnoses it only as a warning:
void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is
an error
void foo() { honeypot(); }

$ clang foo.c -c
p.c:2:14: warning: 'honeypot' is unavailable [-Wunavailable-declarations]
void foo() { honeypot(); }
             ^
p.c:1:6: note: function has been explicitly marked unavailable here
void honeypot(...) __attribute__((overloadable, unavailable)); // calling me is
an error
     ^
2 diagnostics generated.


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