../../../gcc/gcc/final.c: In function ‘profile_function’: ../../../gcc/gcc/final.c:1627:45: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] ../../../gcc/gcc/final.c:1629:46: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] ../../../gcc/gcc/final.c:1636:45: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body] ../../../gcc/gcc/final.c:1638:44: error: suggest braces around empty body in an ‘if’ statement [-Werror=empty-body]
Does profiling actually work on the v850? It seems strange that v850.h defines ASM_OUTPUT_REG_PUSH / ASM_OUTPUT_REG_POP as empty - I'd expect the profiled program to suffer from clobbered registers.
FWIW, following the GNU coding standard advice on 'swallowing the semicolon' avoids the warning: Index: config/v850/v850.h =================================================================== --- config/v850/v850.h (revision 166609) +++ config/v850/v850.h (working copy) @@ -888,8 +888,8 @@ #define ADDITIONAL_REGISTER_NAMES { "r30", 30 }, \ { "lp", LP_REGNUM} } -#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) -#define ASM_OUTPUT_REG_POP(FILE,REGNO) +#define ASM_OUTPUT_REG_PUSH(FILE,REGNO) do {} while (0) +#define ASM_OUTPUT_REG_POP(FILE,REGNO) do {} while (0) /* This is how to output an element of a case-vector that is absolute. */
Hi Joern, > FWIW, following the GNU coding standard advice on 'swallowing the semicolon' > avoids the warning: I think that it would be better to just delete the definitions. They are bogus; the v850 does not currently support profiling, so it will be cleaner to just remove them. At patch that does this is pre-approved. Cheers Nick
Author: amylaar Date: Mon Nov 15 14:03:31 2010 New Revision: 166754 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=166754 Log: PR target/46432 * config/v850/v850.h (ASM_OUTPUT_REG_PUSH, ASM_OUTPUT_REG_POP): Delete. Modified: trunk/gcc/ChangeLog trunk/gcc/config/v850/v850.h
Patch has been applied to trunk.