c-opts.c (c_common_post_options): PCH is not compatible with no-unit-at-a-time.
* 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
This commit is contained in:
parent
3f737aa914
commit
a7bf199e10
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user