]> gcc.gnu.org Git - gcc.git/commitdiff
c-opts.c (c_common_post_options): PCH is not compatible with no-unit-at-a-time.
authorJan Hubicka <jh@suse.cz>
Wed, 18 Jun 2008 19:07:51 +0000 (21:07 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Wed, 18 Jun 2008 19:07:51 +0000 (19:07 +0000)
* c-opts.c (c_common_post_options): PCH is not compatible with
no-unit-at-a-time.
* opts.c (handle_options): Enable unit-at-a-time at O0 along with
-fno-toplevel-reorder by default now.
* gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-3.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-4.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-5.c: We no longer complain about incompatibilty.
* gcc.dg/weak/weak-6.c: Fix thinko in previous change.
* gcc.dg/weak/weak-7.c: Likewise.

From-SVN: r136903

gcc/ChangeLog
gcc/c-opts.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/weak/weak-2.c
gcc/testsuite/gcc.dg/weak/weak-3.c
gcc/testsuite/gcc.dg/weak/weak-4.c
gcc/testsuite/gcc.dg/weak/weak-5.c
gcc/testsuite/gcc.dg/weak/weak-6.c
gcc/testsuite/gcc.dg/weak/weak-7.c

index be29e2d94a626dc05d43ec103b519c5a96561838..a86d857d55e92e5d1f6a3433fff5121ff6b082ab 100644 (file)
@@ -1,3 +1,10 @@
+2008-06-18  Jan Hubicka  <jh@suse.cz>
+
+       * c-opts.c (c_common_post_options): PCH is not compatible with
+       no-unit-at-a-time.
+       * opts.c (handle_options): Enable unit-at-a-time at O0 along with
+       -fno-toplevel-reorder by default now.
+
 2008-06-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        PR documentation/30739
index 2eef789978d84cbaee605423820c82347ab917f9..33d0e6bed26d9267c4639c4d708c6e4b7b00497f 100644 (file)
@@ -1038,6 +1038,9 @@ c_common_post_options (const char **pfilename)
   if (num_in_fnames > 1)
     flag_unit_at_a_time = 1;
 
+  if (pch_file && !flag_unit_at_a_time)
+    sorry ("Precompiled headers require -funit-at-a-time");
+
   /* Default to ObjC sjlj exception handling if NeXT runtime.  */
   if (flag_objc_sjlj_exceptions < 0)
     flag_objc_sjlj_exceptions = flag_next_runtime;
index 4a6d440bc1bdcbd0f6d5336c958ca5709e03dbd6..6d6d380fdb75d617457fe6fa71dd4d5023752360 100644 (file)
@@ -822,6 +822,13 @@ decode_options (unsigned int argc, const char **argv)
       flag_merge_constants = 0;
     }
 
+  if (!no_unit_at_a_time_default)
+    {
+      flag_unit_at_a_time = 1;
+      if (!optimize)
+        flag_toplevel_reorder = 0;
+    }
+
   if (optimize >= 1)
     {
       flag_defer_pop = 1;
@@ -848,8 +855,6 @@ decode_options (unsigned int argc, const char **argv)
       flag_tree_fre = 1;
       flag_tree_copy_prop = 1;
       flag_tree_sink = 1;
-      if (!no_unit_at_a_time_default)
-        flag_unit_at_a_time = 1;
 
       if (!optimize_size)
        {
index 6d2a7952d4c0818dd4ac6eb646db4990cd082174..bf4c5b9318598206fbb2f037e2d31ca3be89a784 100644 (file)
@@ -1,3 +1,12 @@
+2008-06-16  Jan Hubicka  <jh@suse.cz>
+
+       * gcc.dg/weak/weak-2.c: We no longer complain about incompatibilty.
+       * gcc.dg/weak/weak-3.c: We no longer complain about incompatibilty.
+       * gcc.dg/weak/weak-4.c: We no longer complain about incompatibilty.
+       * gcc.dg/weak/weak-5.c: We no longer complain about incompatibilty.
+       * gcc.dg/weak/weak-6.c: Fix thinko in previous change.
+       * gcc.dg/weak/weak-7.c: Likewise.
+
 2008-06-16  Jan Hubicka  <jh@suse.cz>
 
        * gcc.dg/asm-wide-1.c: Do not require extra errors we output
index 7f9cde5d0951e0d1fdcf0b172f3075b9e588c158..973f4c216b64d4f5f5bfe80b7fbd43f227e1329f 100644 (file)
@@ -24,7 +24,7 @@ void * foo1b (void)
   return (void *)ffoo1b;
 }
 
-extern void * ffoo1c (void);  /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
+extern void * ffoo1c (void);
 void * foo1c (void)
 {
   return (void *)ffoo1c;
index 21e5fa09c28b8aac16857df9d6d880ce3c325063..748bd236cc51d6c5adf6e89828fbc4891adfa4a8 100644 (file)
@@ -34,7 +34,7 @@ void * foo1c (void)
 {
   return (void *)ffoo1c;
 }
-extern void * ffoo1c (void) __attribute__((weak)); /* { dg-warning "weak declaration" "weak declaration" } */
+extern void * ffoo1c (void) __attribute__((weak));
 
 
 int ffoo1d (void);
@@ -59,7 +59,7 @@ void * foo1f (void)
   return 0;
 }
 void * ffoox1f (void) { return (void *)0; }
-extern void * ffoo1f (void)  __attribute__((weak, alias ("ffoox1f"))); /* { dg-warning "weak declaration" "weak declaration" } */
+extern void * ffoo1f (void)  __attribute__((weak, alias ("ffoox1f")));
 
 
 extern void * ffoo1g (void);
index 622a1c6675eee63c38591a47091e39363425e1eb..cd8a1e9124d568eefef517223c944fbbda5c987d 100644 (file)
@@ -32,7 +32,7 @@ void * foo1b (void)
 }
 
 
-extern int vfoo1c;  /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
+extern int vfoo1c;
 void * foo1c (void)
 {
   return (void *)&vfoo1c;
@@ -64,7 +64,7 @@ void * foo1f (void)
 #pragma weak vfoo1f
 
 
-extern int vfoo1g;  /* { dg-warning "applying #pragma weak" "applying #pragma weak" } */
+extern int vfoo1g;
 void * foo1g (void)
 {
   return (void *)&vfoo1g;
index a8aca2875448cad07389a5d2bc898a7d21568fa5..e82792af3ff0d2d49174cc7c9ad45f44a6781d70 100644 (file)
@@ -39,7 +39,7 @@ void * foo1c (void)
 {
   return (void *)&vfoo1c;
 }
-extern int vfoo1c __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
+extern int vfoo1c __attribute__((weak));
 
 
 extern int vfoo1d __attribute__((weak));
@@ -63,7 +63,7 @@ void * foo1f (void)
 {
   return (void *)&vfoo1f;
 }
-extern int vfoo1f __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
+extern int vfoo1f __attribute__((weak));
 
 
 extern int vfoo1g;
@@ -71,7 +71,7 @@ void * foo1g (void)
 {
   return (void *)&vfoo1g;
 }
-int vfoo1g __attribute__((weak)); /* { dg-warning "unspecified behavior" } */
+int vfoo1g __attribute__((weak));
 
 
 extern int vfoo1h __attribute__((weak));
index 3a660f71ba6e5753ce77d6edef2b6392c7ebd36b..6fa0d66ff2dfc6489790cb801edb237958d635b0 100644 (file)
@@ -2,5 +2,6 @@
 /* { dg-require-weak "" } */
 
 extern void * foo (void);
-void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
+void * foo (void) { return (void *)foo; }
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
 #pragma weak foo
index 031f830783f6db335af12790c8ed72243aad7252..07c03bc975ad228e8418848a484609a0ea318bbf 100644 (file)
@@ -2,5 +2,6 @@
 /* { dg-require-weak "" } */
 
 extern void * foo (void);
-void * foo (void) { return (void *)foo; } /* { dg-error "precede" } */
+void * foo (void) { return (void *)foo; }
+/* { dg-error "function pointer" "pointer conversion" { target *-*-* } 5 } */
 extern void * foo (void) __attribute__((weak));
This page took 0.164906 seconds and 5 git commands to generate.