diff options
author | David Edelsohn <edelsohn@gnu.org> | 2005-11-11 17:59:54 +0000 |
---|---|---|
committer | David Edelsohn <edelsohn@gnu.org> | 2005-11-11 17:59:54 +0000 |
commit | e1643b438172d66db42241607b08d604ff046ff4 (patch) | |
tree | 579ca01ef316f3815821b5b5fc7a82d62fcb1aaa /gcc/varasm.c | |
parent | 25f71b0b0c770898e215077be0254f3574b7e451 (diff) |
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: https://gcc.gnu.org/svn/gcc/trunk@106791 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/varasm.c')
-rw-r--r-- | gcc/varasm.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 |