[llvm-bugs] [Bug 38352] New: Multiple attributes wrongly accepted without commas
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 28 23:18:56 PDT 2018
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: unassignedclangbugs at nondot.org
Reporter: zhonghao at pku.org.cn
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180729/3d098295/attachment.html>
More information about the llvm-bugs
mailing list