aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc/objc-act.c
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2011-02-20 17:52:44 +0000
committerNicola Pero <nicola@gcc.gnu.org>2011-02-20 17:52:44 +0000
commit6d549148695719942e87205dc0a765317757a905 (patch)
tree4fa88789da4ac6afcba1f80d69d01dcbd5728d40 /gcc/objc/objc-act.c
parent3890ce93e267fe56883b7b831475180641d9038f (diff)
downloadgcc-6d549148695719942e87205dc0a765317757a905.zip
gcc-6d549148695719942e87205dc0a765317757a905.tar.gz
gcc-6d549148695719942e87205dc0a765317757a905.tar.bz2
Reverted usage of TARGET_64BIT for code generation for GNU Objective-C runtime
From-SVN: r170343
Diffstat (limited to 'gcc/objc/objc-act.c')
-rw-r--r--gcc/objc/objc-act.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index 0cabc52..a91c708 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -466,6 +466,8 @@ objc_write_global_declarations (void)
and code if only checking syntax, or if generating a PCH file. */
if (!flag_syntax_only && !pch_file)
{
+ location_t saved_location;
+
/* If gen_declaration desired, open the output file. */
if (flag_gen_declaration)
{
@@ -475,8 +477,24 @@ objc_write_global_declarations (void)
fatal_error ("can%'t open %s: %m", dumpname);
free (dumpname);
}
+
+ /* Set the input location to BUILTINS_LOCATION. This is good
+ for error messages, in case any is generated while producing
+ the metadata, but it also silences warnings that would be
+ produced when compiling with -Wpadded in case when padding is
+ automatically added to the built-in runtime data structure
+ declarations. We know about this padding, and it is fine; we
+ don't want users to see any warnings about it if they use
+ -Wpadded. */
+ saved_location = input_location;
+ input_location = BUILTINS_LOCATION;
+
/* Compute and emit the meta-data tables for this runtime. */
(*runtime.generate_metadata) ();
+
+ /* Restore the original location, just in case it mattered. */
+ input_location = saved_location;
+
/* ... and then close any declaration file we opened. */
if (gen_declaration_file)
fclose (gen_declaration_file);