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

            Bug ID: 38352
           Summary: Multiple attributes wrongly accepted without commas
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangb...@nondot.org
          Reporter: zhong...@pku.org.cn
                CC: llvm-bugs@lists.llvm.org

clang wrongly accepts:

extern int foo (void) __attribute__ ((const const));

Multiple attributes inside a single __attribute__ (()) should be required to be
separated by commas, so ((const, const)). 

I tried gcc. It rejects the code:

gcc code0.c 
code0.c:1:44: error: expected ')' before 'const'
 extern int foo (void) __attribute__ ((const const));
                                            ^~~~~~
                                            )
code0.c:1:51: error: expected ',' or ';' before ')' token
 extern int foo (void) __attribute__ ((const const));
                                                   ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to