[LLVMbugs] [Bug 8635] New: may_alias attribute on function parameter gives warning

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Nov 17 03:31:06 PST 2010


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

           Summary: may_alias attribute on function parameter gives
                    warning
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: hans at chromium.org
                CC: llvmbugs at cs.uiuc.edu


Compiling the following file with Clang built from trunk gives the following
warning:

void f(int __attribute__((may_alias)) *x) {
}

/tmp/a.cc:1:27: warning: 'may_alias' attribute only applies to variable and
function types
void f(int __attribute__((may_alias)) *x) {
                          ^
1 warning generated.


It seems this was introduced in
http://llvm.org/viewvc/llvm-project?view=rev&revision=119407

I'm not familiar with this stuff, but it seems may_alias can be used both as a
type and a variable attribute and Clang only recognizes the former?


(This breaks the Chromium/Clang build because glib headers use this attribute
all over the place and the warnings gets treated as an error.)

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