spu.h (C_COMMON_OVERRIDE_OPTIONS): Define.
* config/spu/spu.h (C_COMMON_OVERRIDE_OPTIONS): Define. (REGISTER_TARGET_PRAGMAS): Don't zero warn_main flag. * config/spu/spu-protos.h (spu_c_common_override_options): Declare. * config/spu/spu-c.c (spu_c_common_override_options): New. * config/spu/spu.c (spu_override_options): Whitespace fix. testsuite/ * gcc.target/spu/Wmain.c: New test. From-SVN: r119817
This commit is contained in:
parent
26dff230b8
commit
83a01f24c3
7 changed files with 32 additions and 3 deletions
|
@ -1,3 +1,13 @@
|
|||
2006-12-13 Sa Liu <saliu@de.ibm.com>
|
||||
Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* config/spu/spu.h (C_COMMON_OVERRIDE_OPTIONS): Define.
|
||||
(REGISTER_TARGET_PRAGMAS): Don't zero warn_main flag.
|
||||
* config/spu/spu-protos.h (spu_c_common_override_options):
|
||||
Declare.
|
||||
* config/spu/spu-c.c (spu_c_common_override_options): New.
|
||||
* config/spu/spu.c (spu_override_options): Whitespace fix.
|
||||
|
||||
2006-12-12 Trevor Smigiel <trevor_smigiel@playstation.sony.com>
|
||||
|
||||
* config/spu/spu.c (cpat_info): Fix an incorrectly identified case.
|
||||
|
|
|
@ -141,3 +141,12 @@ spu_cpu_cpp_builtins (struct cpp_reader *pfile)
|
|||
builtin_define_std ("__vector=__attribute__((__spu_vector__))");
|
||||
}
|
||||
|
||||
void
|
||||
spu_c_common_override_options (void)
|
||||
{
|
||||
if (!TARGET_STD_MAIN)
|
||||
{
|
||||
/* Don't give warnings about the main() function. */
|
||||
warn_main = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ extern enum machine_mode spu_eh_return_filter_mode (void);
|
|||
extern void spu_cpu_cpp_builtins (struct cpp_reader * pfile);
|
||||
extern void builtin_define_std (const char *);
|
||||
extern void spu_override_options (void);
|
||||
extern void spu_c_common_override_options (void);
|
||||
extern int valid_subreg (rtx op);
|
||||
extern void spu_expand_extv (rtx * ops, int unsignedp);
|
||||
extern void spu_expand_insv (rtx * ops);
|
||||
|
|
|
@ -257,7 +257,6 @@ struct gcc_target targetm = TARGET_INITIALIZER;
|
|||
void
|
||||
spu_override_options (void)
|
||||
{
|
||||
|
||||
/* Override some of the default param values. With so many registers
|
||||
larger values are better for these params. */
|
||||
if (MAX_UNROLLED_INSNS == 100)
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#define TARGET_VERSION fprintf (stderr, " (spu %s)", __DATE__);
|
||||
|
||||
#define OVERRIDE_OPTIONS spu_override_options()
|
||||
#define C_COMMON_OVERRIDE_OPTIONS spu_c_common_override_options()
|
||||
|
||||
extern int target_flags;
|
||||
extern const char *spu_fixed_range_string;
|
||||
|
@ -242,8 +243,6 @@ enum reg_class {
|
|||
|
||||
#define REGISTER_TARGET_PRAGMAS() do { \
|
||||
targetm.resolve_overloaded_builtin = spu_resolve_overloaded_builtin; \
|
||||
/* Don't give warnings about the main() function. */ \
|
||||
warn_main = 0; \
|
||||
}while (0);
|
||||
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
2006-12-13 Ben Elliston <bje@au.ibm.com>
|
||||
|
||||
* gcc.target/spu/Wmain.c: New test.
|
||||
|
||||
2006-12-12 Josh Conner <jconner@apple.com>
|
||||
|
||||
* g++.dg/abi/thunk3.C: Use .weak_definition on darwin.
|
||||
|
|
7
gcc/testsuite/gcc.target/spu/Wmain.c
Normal file
7
gcc/testsuite/gcc.target/spu/Wmain.c
Normal file
|
@ -0,0 +1,7 @@
|
|||
/* { dg-do compile } */
|
||||
/* { dg-options "-Wmain -mstdmain" } */
|
||||
|
||||
int main (void *wrong)
|
||||
{ /* { dg-warning "first argument of 'main' should be 'int'" "" } */
|
||||
/* { dg-warning "'main' takes only zero or two arguments" "" { target *-*-* } 5 } */
|
||||
}
|
Loading…
Add table
Reference in a new issue