OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [cpp/] [pragma-diagnostic-2.c] - Rev 689

Compare with Previous | Blame | View Log

/*
  { dg-options "-Wuninitialized -ftrack-macro-expansion=2" }
  { dg-do compile }
*/
 
void f (unsigned);
 
#define CODE_WITH_WARNING \
  int a; /* { dg-message "expansion|declared here" } */  \
  f (a)	 /* { dg-message "expansion" } */
 
#pragma GCC diagnostic ignored "-Wuninitialized"
 
void
g (void)
{
  CODE_WITH_WARNING;
}
 
#pragma GCC diagnostic push
 
#pragma GCC diagnostic error "-Wuninitialized"
 
void
h (void)
{
  CODE_WITH_WARNING;		/* { dg-message "expanded" } */
}
 
/*
  { dg-message "some warnings being treated as errors" "" {target *-*-*} 0 }
*/
 
/* { dg-error "uninitialized" "" { target *-*-* } { 10 } } */
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.