* gcc.dg/compare1.c: New test.
From-SVN: r26751
This commit is contained in:
parent
8ca4790205
commit
ddcd89b9a0
@ -1,3 +1,7 @@
|
||||
1999-05-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
|
||||
|
||||
* gcc.dg/compare1.c: New test.
|
||||
|
||||
1999-05-02 Joseph S. Myers <jsm28@cam.ac.uk>
|
||||
|
||||
* gcc.dg/cast-qual-1.c, gcc.dg/return-type-1.c, gcc.dg/unused-1.c:
|
||||
|
26
gcc/testsuite/gcc.dg/compare1.c
Normal file
26
gcc/testsuite/gcc.dg/compare1.c
Normal file
@ -0,0 +1,26 @@
|
||||
/* Test for a bogus warning on comparison between signed and unsigned.
|
||||
This was inspired by code in gcc. */
|
||||
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-Wsign-compare" } */
|
||||
|
||||
int target_flags = 1;
|
||||
|
||||
enum machine_mode
|
||||
{
|
||||
VOIDmode , PQImode , QImode , PHImode , HImode ,
|
||||
PSImode , SImode , PDImode , DImode , TImode , OImode , QFmode ,
|
||||
HFmode , TQFmode , SFmode , DFmode , XFmode , TFmode , QCmode ,
|
||||
HCmode , SCmode , DCmode , XCmode , TCmode , CQImode , CHImode ,
|
||||
CSImode , CDImode , CTImode , COImode , BLKmode , CCmode , CCXmode,
|
||||
CC_NOOVmode, CCX_NOOVmode, CCFPmode, CCFPEmode , MAX_MACHINE_MODE
|
||||
};
|
||||
|
||||
#define Pmode ( target_flags ? DImode : SImode )
|
||||
|
||||
int main()
|
||||
{
|
||||
enum machine_mode mode = DImode;
|
||||
|
||||
return (mode == Pmode); /* dg-bogus "warning:" "comparison between signed and unsigned" } */
|
||||
}
|
Loading…
Reference in New Issue
Block a user