Bug ID: 34092
Summary: Misleading warning produced for tentative array
OS: MacOS X
Component: -New Bugs
Created attachment 18918
Example of tentative definitions. Compile with clang -o tentative tentative.c
It is valid (if strange) C to give a tentative definition of an array with an
array bound unspecified and then specify the bound in a subsequent declaration.
clang immediately issues a warning "tentative array definition assumed to have
one element" when it encounters the tentative definition. This is misleading
because the compiler should not make that assumption until it has processed the
entire translation unit and found that the composite type has an unspecified
bound. (See C99 section 6.9.2 External Object Definitions, particularly Example
The attached example shows that the compiler is actually conforming with the
standard despite the warning.
You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list