/* RUN: %clang_cc1 -std=c89 -fsyntax-only -verify=expected,c89only -pedantic -Wno-c11-extensions %s
RUN: %clang_cc1 -std=c99 -fsyntax-only -verify=expected,c99untilc2x -pedantic -Wno-c11-extensions %s
RUN: %clang_cc1 -std=c11 -fsyntax-only -verify=expected,c99untilc2x -pedantic %s
RUN: %clang_cc1 -std=c17 -fsyntax-only -verify=expected,c99untilc2x -pedantic %s
RUN: %clang_cc1 -std=c2x -fsyntax-only -verify=expected,c2xandup -pedantic %s
*/
/* The following are DRs which do not require tests to demonstrate
* conformance or nonconformance.
*
* WG14 DR100: dup 001
* Defect with the return statement
*
* WG14 DR104: dup 084
* Incomplete tag types in a parameter list
*
* WG14 DR109: yes
* Are undefined values and undefined behavior the same?
*
* WG14 DR110: dup 047
* Formal parameters having array-of-non-object types
*
* WG14 DR117: yes
* Abstract semantics, sequence points, and expression evaluation
*
* WG14 DR121: yes
* Conversions of pointer values to integral types
*
* WG14 DR122: dup 015
* Conversion/widening of bit-fields
*
* WG14 DR125: yes
* Using things declared as 'extern (qualified) void'
*
* WG14 DR127: dup 013
* Composite type of an enumerated type and an integral type
*
* WG14 DR132: dup 109
* Can undefined behavior occur at translation time, or only at run time?
*
* WG14 DR133: yes
* Undefined behavior not previously listed in subclause G2
*
* WG14 DR138: yes
* Is there an allocated storage duration?
*
* WG14 DR139: yes
* Compatibility of complete and incomplete types
*
* WG14 DR146: yes
* Nugatory constraint
*
* WG14 DR147: yes
* Sequence points in library functions
*
* WG14 DR148: yes
* Defining library functions
*
* WG14 DR149: yes
* The term "variable"
*
* WG14 DR154: yes
* Consistency of implementation-defined values
*
* WG14 DR159: yes
* Consistency of the C Standard Defects exist in the way the Standard refers
* to itself
*
* WG14 DR161: yes
* Details of reserved symbols
*
* WG14 DR169: yes
* Trigraphs
*/
/* WG14 DR101: yes
* Type qualifiers and "as if by assignment"
*/
void ;
void
/* WG14 DR102: yes
* Tag redeclaration constraints
*/
void
/* WG14 DR103: yes
* Formal parameters of incomplete type
*/
void ; /* ok, not an incomplete type due to rewrite */
void /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
expected-error {{variable has incomplete type 'struct S'}}
expected-note {{forward declaration of 'struct S'}} */
void ; /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
expected-note {{previous declaration is here}} */
void /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}}
expected-error {{conflicting types for 'dr103_3'}} */
void ; /* expected-warning {{declaration of 'struct S' will not be visible outside of this function}} */
/* WG14 DR105: dup 017
* Precedence of requirements on compatible types
*
* NB: This is also Question 3 from DR017.
*/
void
/* WG14 DR106: yes
* When can you dereference a void pointer?
*
* NB: This is a partial duplicate of DR012.
*/
void
/* WG14 DR108: yes
* Can a macro identifier hide a keyword?
*/
void
/* WG14 DR111: yes
* Conversion of pointer-to-qualified type values to type (void*) values
*/
void
/* WG14 DR112: yes
* Null pointer constants and relational comparisons
*/
void
/* WG14 DR113: yes
* Return expressions in functions declared to return qualified void
*/
volatile void
const void
/* WG14 DR114: yes
* Initialization of multi-dimensional char array objects
*/
void
/* WG14 DR115: yes
* Member declarators as declarators
*/
void
/* WG14 DR116: yes
* Implicit unary & applied to register arrays
*/
void
/* WG14 DR118: yes
* Completion point for enumerated types
*/
void
/* WG14 DR119: yes
* Initialization of multi-dimensional array objects
*/
void
/* WG14 DR120: yes
* Semantics of assignment to (and initialization of) bit-fields
*/
void
/* WG14 DR123: yes
* 'Type categories' and qualified types
*/
void
/* WG14 DR124: yes
* Casts to 'a void type' versus casts to 'the void type'
*/
void
/* WG14 DR126: yes
* What does 'synonym' mean with respect to typedef names?
*/
void
/* WG14 DR128: yes
* Editorial issue relating to tag declarations in type specifiers
*/
void
/* WG14 DR129: yes
* Tags and name spaces
*/
;
void
/* WG14 DR131: yes
* const member qualification and assignment
*/
void
/* WG14 DR142: yes
* Reservation of macro names
*/
void
/* WG14 DR144: yes
* Preprocessing of preprocessing directives
*/
# DR144 include <stddef.h> /* expected-error {{invalid preprocessing directive}} */
DR144 # include <stddef.h> /* expected-error {{expected identifier or '('}} */
/* WG14 DR145:
* Constant expressions
*/
void
/* WG14 DR150: yes
* Initialization of a char array from a string literal
*/
void
/* WG14 DR163: yes
* Undeclared identifiers
*/
void
/* WG14 DR164: yes
* Bad declarations
*/
void