URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 149 |
Rev 154 |
/* PR17544 Incorrect -Wunreachable-code warning
|
/* PR17544 Incorrect -Wunreachable-code warning
|
Origin: Giovanni Bajo
|
Origin: Giovanni Bajo
|
|
|
In C99 we append a "return 0;" when finishing a function, but it was
|
In C99 we append a "return 0;" when finishing a function, but it was
|
not given a source location. The gimplifier thinks a return statement
|
not given a source location. The gimplifier thinks a return statement
|
needs a locus so it would add one, making the compiler generated code
|
needs a locus so it would add one, making the compiler generated code
|
visible to the unreachable code warning. */
|
visible to the unreachable code warning. */
|
|
|
/* { dg-do compile } */
|
/* { dg-do compile } */
|
/* { dg-options "-std=c99 -O -Wunreachable-code" } */
|
/* { dg-options "-std=c99 -O -Wunreachable-code" } */
|
|
|
int main (void) // 1
|
int main (void) // 1
|
{ // 2
|
{ // 2
|
return 0; // 3
|
return 0; // 3
|
} // 4
|
} // 4
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.