Skip to content

Commit

Permalink
Add some more expected warnings to this C99 DR test
Browse files Browse the repository at this point in the history
This should address the issue found by:
https://lab.llvm.org/buildbot/#/builders/171/builds/16835
  • Loading branch information
AaronBallman committed Jul 1, 2022
1 parent 83fdf0c commit ac8dab8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions clang/test/C/drs/dr2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ void dr204(void) {
* rank; it's acceptable to use an unsigned long or unsigned int for the size
* type (those ranks are not greater than that of signed long).
*/
(void)_Generic(s + sl, unsigned long long : 1, unsigned long : 1, unsigned int : 1);
(void)_Generic(p + sl, signed long long : 1, signed long : 1, signed int : 1);
(void)_Generic(s + sl, unsigned long long : 1, unsigned long : 1, unsigned int : 1); /* c89only-warning {{'long long' is an extension when C99 mode is not enabled}} */
(void)_Generic(p + sl, signed long long : 1, signed long : 1, signed int : 1); /* c89only-warning {{'long long' is an extension when C99 mode is not enabled}} */
#elif __LLONG_WIDTH__ == __LONG_WIDTH__
/* But if the implementation doesn't support a larger standard integer type
* than signed long, the conversion rank should prefer signed long if the type
Expand Down

0 comments on commit ac8dab8

Please sign in to comment.