diff options
author | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-13 05:25:57 +0000 |
---|---|---|
committer | bje <bje@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-12-13 05:25:57 +0000 |
commit | 8ddfcaa9b11f07320fc4c013a5ca77d967c2c4e6 (patch) | |
tree | 46921cd4d659ebf3be2f757a6c581f1dde455773 /gcc/config | |
parent | 4e37c006fb3948327ff04b9139202b5a7ae75ca9 (diff) | |
download | gcc-8ddfcaa9b11f07320fc4c013a5ca77d967c2c4e6.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@119817 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/spu/spu-c.c | 9 | ||||
-rw-r--r-- | gcc/config/spu/spu-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/spu/spu.c | 1 | ||||
-rw-r--r-- | gcc/config/spu/spu.h | 3 |
4 files changed, 11 insertions, 3 deletions
diff --git a/gcc/config/spu/spu-c.c b/gcc/config/spu/spu-c.c index d52d5242c7f..43d5d16b825 100644 --- a/gcc/config/spu/spu-c.c +++ b/gcc/config/spu/spu-c.c @@ -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; + } +} diff --git a/gcc/config/spu/spu-protos.h b/gcc/config/spu/spu-protos.h index 710c833746a..01f5c60c887 100644 --- a/gcc/config/spu/spu-protos.h +++ b/gcc/config/spu/spu-protos.h @@ -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); diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c index 52b21e2e72a..7317da70afb 100644 --- a/gcc/config/spu/spu.c +++ b/gcc/config/spu/spu.c @@ -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) diff --git a/gcc/config/spu/spu.h b/gcc/config/spu/spu.h index 813bc6c039b..5dc88fb8ee3 100644 --- a/gcc/config/spu/spu.h +++ b/gcc/config/spu/spu.h @@ -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); |