summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-11 17:59:54 +0000
committerdje <dje@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-11 17:59:54 +0000
commitbf2a1b05bc8b844197b710a9182c69b4c565dd93 (patch)
tree579ca01ef316f3815821b5b5fc7a82d62fcb1aaa
parent488493c5e7d340aba761f541b771a87e4d4c29b4 (diff)
downloadppe42-gcc-bf2a1b05bc8b844197b710a9182c69b4c565dd93.tar.gz
ppe42-gcc-bf2a1b05bc8b844197b710a9182c69b4c565dd93.zip
PR 24644
* common.opt (Wvolatile-register-var): New. * varasm.c (make_decl_rtl): Only emit warning when option specified. Clarify warning message. * doc/invoke.texi (Wvolatile-register-var): Document new option. * doc/md.texi (copysign): Document standard named pattern. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@106791 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/common.opt4
-rw-r--r--gcc/doc/invoke.texi9
-rw-r--r--gcc/doc/md.texi10
-rw-r--r--gcc/varasm.c5
5 files changed, 35 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 425bc1ae521..2d125ef96d8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-11 David Edelsohn <edelsohn@gnu.org>
+
+ PR 24644
+ * common.opt (Wvolatile-register-var): New.
+ * varasm.c (make_decl_rtl): Only emit warning when option
+ specified. Clarify warning message.
+ * doc/invoke.texi (Wvolatile-register-var): Document new option.
+
+ * doc/md.texi (copysign): Document standard named pattern.
+
2005-11-11 Jie Zhang <jie.zhang@analog.com>
* config/bfin/bfin.c (bfin_expand_strmov): Correctly move the trailing
diff --git a/gcc/common.opt b/gcc/common.opt
index 67e91d39a85..6ac77fdddee 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -173,6 +173,10 @@ Wunused-variable
Common Var(warn_unused_variable)
Warn when a variable is unused
+Wvolatile-register-var
+Common Var(warn_register_var)
+Warn when a register variable is declared volatile
+
aux-info
Common Separate
-aux-info <file> Emit declaration information into <file>
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 3e25d390ae0..bbc74786303 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -245,7 +245,7 @@ Objective-C and Objective-C++ Dialects}.
-Wunknown-pragmas -Wno-pragmas -Wunreachable-code @gol
-Wunused -Wunused-function -Wunused-label -Wunused-parameter @gol
-Wunused-value -Wunused-variable -Wvariadic-macros @gol
--Wwrite-strings}
+-Wvolatile-register-var -Wwrite-strings}
@item C-only Warning Options
@gccoptlist{-Wbad-function-cast -Wmissing-declarations @gol
@@ -3370,6 +3370,13 @@ Warn if variadic macros are used in pedantic ISO C90 mode, or the GNU
alternate syntax when in pedantic ISO C99 mode. This is default.
To inhibit the warning messages, use @option{-Wno-variadic-macros}.
+@item -Wvolatile-register-var
+@opindex Wvolatile-register-var
+@opindex Wno-volatile-register-var
+Warn if a register variable is declared volatile. The volatile
+modifier does not inhibit all optimizations that may eliminate reads
+and/or writes to register variables.
+
@item -Wdisabled-optimization
@opindex Wdisabled-optimization
Warn if a requested optimization pass is disabled. This warning does
diff --git a/gcc/doc/md.texi b/gcc/doc/md.texi
index 4fc8c3b76cc..087f4441cc8 100644
--- a/gcc/doc/md.texi
+++ b/gcc/doc/md.texi
@@ -3306,6 +3306,16 @@ corresponds to the C data type @code{double} and the @code{rintf}
built-in function uses the mode which corresponds to the C data
type @code{float}.
+@cindex @code{copysign@var{m}3} instruction pattern
+@item @samp{copysign@var{m}3}
+Store a value with the magnitude of operand 1 and the sign of operand
+2 into operand 0.
+
+The @code{copysign} built-in function of C always uses the mode which
+corresponds to the C data type @code{double} and the @code{copysignf}
+built-in function uses the mode which corresponds to the C data
+type @code{float}.
+
@cindex @code{ffs@var{m}2} instruction pattern
@item @samp{ffs@var{m}2}
Store into operand 0 one plus the index of the least significant 1-bit
diff --git a/gcc/varasm.c b/gcc/varasm.c
index ac511f658a9..ad4d060a29f 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -955,8 +955,9 @@ make_decl_rtl (tree decl)
error ("global register variable has initial value");
}
if (TREE_THIS_VOLATILE (decl))
- warning (0, "volatile register variables don%'t "
- "work as you might wish");
+ warning (OPT_Wvolatile_register_var,
+ "optimization may eliminate reads and/or "
+ "writes to register variables");
/* If the user specified one of the eliminables registers here,
e.g., FRAME_POINTER_REGNUM, we don't want to get this variable
OpenPOWER on IntegriCloud