[llvm-bugs] [Bug 28758] New: Silently allows the erroneous type 'restrict void *' to conditional expression.
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jul 28 14:39:29 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28758
Bug ID: 28758
Summary: Silently allows the erroneous type 'restrict void *'
to conditional expression.
Product: clang
Version: 3.8
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: kylesheilastewart at gmail.com
CC: llvm-bugs at lists.llvm.org
Classification: Unclassified
A conditional expression with second operand of type `void*` and third operand
`int* restrict*` would, by the rules of the conditional operator, have type
`restrict void *`. This type is not allowed, and so should produce a diagnostic
message. However, the following compiles without any diagnostic messages:
#include <stdlib.h>
int main(void){
int* restrict* A = malloc(8);
A ? A : malloc(8);
return 0;
}
--
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/20160728/ce16d256/attachment.html>
More information about the llvm-bugs
mailing list