[llvm-bugs] [Bug 33163] New: Reserved keyword vector can not be recognized in type identifier when a same name occur in variable or function

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 24 20:46:43 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=33163

            Bug ID: 33163
           Summary: Reserved keyword vector can not be recognized in type
                    identifier when a same name occur in variable or
                    function
           Product: clang
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: westion717 at gmail.com
                CC: llvm-bugs at lists.llvm.org

int vector(){return 5;}

int main(){
vector signed int a = {1,2,3,4};
return 0;
}

clang++ a.C -maltivec
a.C:4:7: error: expected ';' after expression
vector signed int a = {1,2,3,4};
      ^
      ;
a.C:4:19: error: excess elements in scalar initializer
vector signed int a = {1,2,3,4};
                  ^     ~~~~~~~
a.C:4:1: warning: expression result unused [-Wunused-value]
vector signed int a = {1,2,3,4};
^~~~~~
1 warning and 2 errors generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170525/b4a47e70/attachment.html>


More information about the llvm-bugs mailing list