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: unassignedclangb...@nondot.org Reporter: kylesheilastew...@gmail.com CC: llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs