[llvm-bugs] [Bug 40144] New: Clang rejects well-formed C99 program using [*] in typeredefinition.
via llvm-bugs
llvm-bugs at lists.llvm.org
Sun Dec 23 04:27:47 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=40144
Bug ID: 40144
Summary: Clang rejects well-formed C99 program using [*] in
typeredefinition.
Product: clang
Version: trunk
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: anders.granlund.0 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Test program (prog.c):
int main()
{
typedef void t(int (*)[*]);
typedef void t(int (*)[*]);
}
Compilation command line:
clang prog.c -Wall -Wextra -std=c11 -pedantic-errors
Observed behaviour:
The following error message is outputed:
error: typedef redefinition with different types ('void (int (*)[*])' vs
'void (int (*)[*])')
Expected behaviour:
No error message. The two types are equal and not a variably modified type,
so
the typeredefinition should be allowed according to the standard.
Note:
gcc does not give any error messages.
--
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/20181223/fb133761/attachment.html>
More information about the llvm-bugs
mailing list