// RUN: %clang_cc1 -fsyntax-only -verify=both,expected %s
// RUN: %clang_cc1 -fsyntax-only -Wstrict-prototypes -verify=both,strict %s
// Test both with and without -Wstrict-prototypes because there are complicated
// interactions between it and -Wdeprecated-non-prototype.
// Off by default warnings, enabled by -pedantic or -Wstrict-prototypes
void ; // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void ; // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
typedef void ; // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void ;
void
void // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
// On by default warnings
void ; // both-warning {{a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition}} \
strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void int a, b; // both-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C2x}}
void int a, b; // both-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C2x}}
void ;
void int a; // both-warning {{a function definition without a prototype is deprecated in all versions of C and is not supported in C2x}}
void ; // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
int
void ; // both-warning {{a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent declaration}} \
strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void ; // both-note {{conflicting prototype is here}}
void ; // both-note {{conflicting prototype is here}}
void ; // both-warning {{a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a previous declaration}} \
strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void ; // both-warning {{a function declaration without a prototype is deprecated in all versions of C and is treated as a zero-parameter prototype in C2x, conflicting with a subsequent definition}} \
strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
void // both-note {{conflicting prototype is here}}
// Just because the prototype is variadic doesn't mean we shouldn't warn on the
// K&R C function definition; this still changes behavior in C2x.
void ;
void char*fmt;
void ; // both-note {{previous declaration is here}}
void // both-error {{conflicting types for 'blapp'}} \
// strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
// Disable -Wdeprecated-non-prototype
void ; // strict-warning {{a function declaration without a prototype is deprecated in all versions of C}}
// Reenable it.
// Disable -Wstrict-prototypes
void ; // OK
// Reenable it.
void