aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@redhat.com>2003-02-01 13:09:41 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2003-02-01 13:09:41 +0000
commit271bd540d12af3d965059fb09b5311224fb3214c (patch)
tree56f3536f7ec2acc99fd65b1c8562d2b55b676989
parent3123c967cc071b53150074d5cc27dab503244888 (diff)
downloadgcc-271bd540d12af3d965059fb09b5311224fb3214c.zip
gcc-271bd540d12af3d965059fb09b5311224fb3214c.tar.gz
gcc-271bd540d12af3d965059fb09b5311224fb3214c.tar.bz2
flags.h (flag_volatile): Remove declaration.
* flags.h (flag_volatile): Remove declaration. (flag_volatile_global, flag_volatile_static): Likewise. * c-typeck.c (build_indirect_ref): Don't check flag_volatile. * toplev.c (flag_volatile): Remove definition. (flag_volatile_global, flag_volatile_static): Likewise. (f_options): Remove corresponding entries here. * varasm.c (make_decl_rtl): Don't check flag_volatile_global or flag_volatile_static. * doc/invoke.texi: Remove documentation of -fvolatile, -fvolatile-global and -fvolatile-static. cp/ * typeck.c (build_indirect_ref): Don't check flag_volatile. ada/ * utils2.c (build_unary_op): Don't check flag_volatile. * gnat_ug.texi: Remove -fvolatile from example. * gnat_ug_vxw.texi: Likewise. testsuite/ * g++.dg/init/new1.C: Remove -fvolatile dg-options line. * g++.dg/init/new2.C: Likewise. * g++.dg/other/new1.C: Likewise. From-SVN: r62245
-rw-r--r--gcc/ChangeLog13
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/gnat_ug.texi6
-rw-r--r--gcc/ada/gnat_ug_vxw.texi6
-rw-r--r--gcc/ada/utils2.c4
-rw-r--r--gcc/c-typeck.c3
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck.c4
-rw-r--r--gcc/doc/invoke.texi17
-rw-r--r--gcc/flags.h12
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/init/new1.C1
-rw-r--r--gcc/testsuite/g++.dg/init/new2.C1
-rw-r--r--gcc/testsuite/g++.dg/other/new1.C1
-rw-r--r--gcc/toplev.c18
-rw-r--r--gcc/varasm.c8
16 files changed, 40 insertions, 70 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 8095a78..da99537 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,16 @@
+2003-02-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * flags.h (flag_volatile): Remove declaration.
+ (flag_volatile_global, flag_volatile_static): Likewise.
+ * c-typeck.c (build_indirect_ref): Don't check flag_volatile.
+ * toplev.c (flag_volatile): Remove definition.
+ (flag_volatile_global, flag_volatile_static): Likewise.
+ (f_options): Remove corresponding entries here.
+ * varasm.c (make_decl_rtl): Don't check flag_volatile_global
+ or flag_volatile_static.
+ * doc/invoke.texi: Remove documentation of -fvolatile,
+ -fvolatile-global and -fvolatile-static.
+
2003-01-31 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
* pa.c (pa_output_function_prologue, pa_output_function_epilogue): Move
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 328296b..d5f612d 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * utils2.c (build_unary_op): Don't check flag_volatile.
+ * gnat_ug.texi: Remove -fvolatile from example.
+ * gnat_ug_vxw.texi: Likewise.
+
2003-01-29 Laurent Guerby <guerby@acm.org>
PR ada/8344
diff --git a/gcc/ada/gnat_ug.texi b/gcc/ada/gnat_ug.texi
index 8faa273..be71814 100644
--- a/gcc/ada/gnat_ug.texi
+++ b/gcc/ada/gnat_ug.texi
@@ -24047,7 +24047,7 @@ For a list of all available switches, refer to the sections describing
Here is an example that passes the option @code{-v} to the GNAT compiler :
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
-cargs -v
@end smallexample
@@ -24056,7 +24056,7 @@ Here is an example that passes the option @code{-v} to the GNAT compiler, binder
and @code{-v} and @code{-g} to the compiler :
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
-cargs -v -g -O2 -bargs -v -largs -v
@end smallexample
@@ -24065,7 +24065,7 @@ In both examples, the following arguments have been automatically added by the P
Facility, and will be used by the C compiler.
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
@end smallexample
@noindent
diff --git a/gcc/ada/gnat_ug_vxw.texi b/gcc/ada/gnat_ug_vxw.texi
index 6ea120e..0c61304 100644
--- a/gcc/ada/gnat_ug_vxw.texi
+++ b/gcc/ada/gnat_ug_vxw.texi
@@ -19279,7 +19279,7 @@ For a list of all available switches, refer to the sections describing
Here is an example that passes the option @code{-v} to the GNAT compiler :
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
-cargs -v
@end smallexample
@@ -19288,7 +19288,7 @@ Here is an example that passes the option @code{-v} to the GNAT compiler, binder
and @code{-v} and @code{-g} to the compiler :
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
-cargs -v -g -O2 -bargs -v -largs -v
@end smallexample
@@ -19297,7 +19297,7 @@ In both examples, the following arguments have been automatically added by the P
Facility, and will be used by the C compiler.
@smallexample
-g -mstrict-align -prjtype $(PRJ_TYPE) -ansi -nostdinc -DRW_MULTI_THREAD -D_REENTRANT
--fvolatile -fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
+-fno-builtin -fno-for-scope -I. -I/usr/windppc-2.0/target/h -DCPU=PPC604
@end smallexample
@noindent
diff --git a/gcc/ada/utils2.c b/gcc/ada/utils2.c
index 3777a5b..1d76d91 100644
--- a/gcc/ada/utils2.c
+++ b/gcc/ada/utils2.c
@@ -1275,8 +1275,8 @@ build_unary_op (op_code, result_type, operand)
TREE_READONLY (result) = TREE_READONLY (TREE_TYPE (type));
}
- side_effects = flag_volatile
- || (! TYPE_FAT_POINTER_P (type) && TYPE_VOLATILE (TREE_TYPE (type)));
+ side_effects = (! TYPE_FAT_POINTER_P (type)
+ && TYPE_VOLATILE (TREE_TYPE (type)));
break;
case NEGATE_EXPR:
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 4134113..bbd94a0 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -1189,7 +1189,6 @@ build_indirect_ref (ptr, errorstring)
if (TREE_CODE (type) == POINTER_TYPE)
{
if (TREE_CODE (pointer) == ADDR_EXPR
- && !flag_volatile
&& (TREE_TYPE (TREE_OPERAND (pointer, 0))
== TREE_TYPE (type)))
return TREE_OPERAND (pointer, 0);
@@ -1215,7 +1214,7 @@ build_indirect_ref (ptr, errorstring)
to change it via some other pointer. */
TREE_READONLY (ref) = TYPE_READONLY (t);
TREE_SIDE_EFFECTS (ref)
- = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer) || flag_volatile;
+ = TYPE_VOLATILE (t) || TREE_SIDE_EFFECTS (pointer);
TREE_THIS_VOLATILE (ref) = TYPE_VOLATILE (t);
return ref;
}
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 5c947c3..f376158 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+2003-02-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * typeck.c (build_indirect_ref): Don't check flag_volatile.
+
2003-01-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/8849
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 37a07b6..6d5cc65 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -2352,7 +2352,6 @@ build_indirect_ref (ptr, errorstring)
return error_mark_node;
}
else if (TREE_CODE (pointer) == ADDR_EXPR
- && !flag_volatile
&& same_type_p (t, TREE_TYPE (TREE_OPERAND (pointer, 0))))
/* The POINTER was something like `&x'. We simplify `*&x' to
`x'. */
@@ -2367,8 +2366,7 @@ build_indirect_ref (ptr, errorstring)
TREE_READONLY (ref) = CP_TYPE_CONST_P (t);
TREE_THIS_VOLATILE (ref) = CP_TYPE_VOLATILE_P (t);
TREE_SIDE_EFFECTS (ref)
- = (TREE_THIS_VOLATILE (ref) || TREE_SIDE_EFFECTS (pointer)
- || flag_volatile);
+ = (TREE_THIS_VOLATILE (ref) || TREE_SIDE_EFFECTS (pointer));
return ref;
}
}
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index e4c39c5..0b4d1dd 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -705,8 +705,7 @@ in the following sections.
-fno-common -fno-ident -fno-gnu-linker @gol
-fpcc-struct-return -fpic -fPIC @gol
-freg-struct-return -fshared-data -fshort-enums @gol
--fshort-double -fshort-wchar -fvolatile @gol
--fvolatile-global -fvolatile-static @gol
+-fshort-double -fshort-wchar @gol
-fverbose-asm -fpack-struct -fstack-check @gol
-fstack-limit-register=@var{reg} -fstack-limit-symbol=@var{sym} @gol
-fargument-alias -fargument-noalias @gol
@@ -10752,20 +10751,6 @@ debugging the compiler itself).
extra information to be omitted and is useful when comparing two assembler
files.
-@item -fvolatile
-@opindex fvolatile
-Consider all memory references through pointers to be volatile.
-
-@item -fvolatile-global
-@opindex fvolatile-global
-Consider all memory references to extern and global data items to
-be volatile. GCC does not consider static data items to be volatile
-because of this switch.
-
-@item -fvolatile-static
-@opindex fvolatile-static
-Consider all memory references to static data to be volatile.
-
@item -fpic
@opindex fpic
@cindex global offset table
diff --git a/gcc/flags.h b/gcc/flags.h
index 8a1998c..80ee6a6 100644
--- a/gcc/flags.h
+++ b/gcc/flags.h
@@ -337,18 +337,6 @@ extern int flag_omit_frame_pointer;
extern int flag_no_peephole;
-/* Nonzero means all references through pointers are volatile. */
-
-extern int flag_volatile;
-
-/* Nonzero means treat all global and extern variables as volatile. */
-
-extern int flag_volatile_global;
-
-/* Nonzero means treat all static variables as volatile. */
-
-extern int flag_volatile_static;
-
/* Nonzero allows GCC to optimize sibling and tail recursive calls. */
extern int flag_optimize_sibling_calls;
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 91bba4a..61ed54b 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2003-02-01 Richard Sandiford <rsandifo@redhat.com>
+
+ * g++.dg/init/new1.C: Remove -fvolatile dg-options line.
+ * g++.dg/init/new2.C: Likewise.
+ * g++.dg/other/new1.C: Likewise.
+
2003-01-31 Loren J. Rittle <ljrittle@acm.org>
* gcc.dg/struct-ret-libc.c: New test.
diff --git a/gcc/testsuite/g++.dg/init/new1.C b/gcc/testsuite/g++.dg/init/new1.C
index 24b60d3..5015d81 100644
--- a/gcc/testsuite/g++.dg/init/new1.C
+++ b/gcc/testsuite/g++.dg/init/new1.C
@@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
-// { dg-options "-fvolatile" }
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/init/new2.C b/gcc/testsuite/g++.dg/init/new2.C
index 572cb28..8b207d0 100644
--- a/gcc/testsuite/g++.dg/init/new2.C
+++ b/gcc/testsuite/g++.dg/init/new2.C
@@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
-// { dg-options "-fvolatile" }
class bar {
public :
diff --git a/gcc/testsuite/g++.dg/other/new1.C b/gcc/testsuite/g++.dg/other/new1.C
index 24b60d3..5015d81 100644
--- a/gcc/testsuite/g++.dg/other/new1.C
+++ b/gcc/testsuite/g++.dg/other/new1.C
@@ -1,7 +1,6 @@
// Origin: asharji@uwaterloo.ca
// { dg-do compile }
-// { dg-options "-fvolatile" }
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 3ab85ad..f783ed9 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -606,18 +606,6 @@ int flag_signaling_nans = 0;
int flag_complex_divide_method = 0;
-/* Nonzero means all references through pointers are volatile. */
-
-int flag_volatile;
-
-/* Nonzero means treat all global and extern variables as volatile. */
-
-int flag_volatile_global;
-
-/* Nonzero means treat all static variables as volatile. */
-
-int flag_volatile_static;
-
/* Nonzero means just do syntax checking; don't output anything. */
int flag_syntax_only = 0;
@@ -986,12 +974,6 @@ static const lang_independent_options f_options[] =
N_("Perform DWARF2 duplicate elimination") },
{"float-store", &flag_float_store, 1,
N_("Do not store floats in registers") },
- {"volatile", &flag_volatile, 1,
- N_("Consider all mem refs through pointers as volatile") },
- {"volatile-global", &flag_volatile_global, 1,
- N_("Consider all mem refs to global data to be volatile") },
- {"volatile-static", &flag_volatile_static, 1,
- N_("Consider all mem refs to static data to be volatile") },
{"defer-pop", &flag_defer_pop, 1,
N_("Defer popping functions args from stack until later") },
{"omit-frame-pointer", &flag_omit_frame_pointer, 1,
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9fc92c4..fa6bf2c 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -920,14 +920,6 @@ make_decl_rtl (decl, asmspec)
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
}
- /* If this variable is to be treated as volatile, show its
- tree node has side effects. */
- if ((flag_volatile_global && TREE_CODE (decl) == VAR_DECL
- && TREE_PUBLIC (decl))
- || ((flag_volatile_static && TREE_CODE (decl) == VAR_DECL
- && (TREE_PUBLIC (decl) || TREE_STATIC (decl)))))
- TREE_SIDE_EFFECTS (decl) = 1;
-
x = gen_rtx_MEM (DECL_MODE (decl), gen_rtx_SYMBOL_REF (Pmode, name));
SYMBOL_REF_WEAK (XEXP (x, 0)) = DECL_WEAK (decl);
if (TREE_CODE (decl) != FUNCTION_DECL)