On Nov 7, 2013, at 5:13 PM, Mingjie Xing mingjie.x...@gmail.com wrote:
Well, it is my understanding that the warning should be emitted for a
volatile variable only if it is not accessed. Initialization means
accessing, even though it is not used anywhere.
Let me try. A warning is useful, if
On Fri, Nov 8, 2013 at 5:03 PM, Mike Stump mikest...@comcast.net wrote:
On Nov 7, 2013, at 5:13 PM, Mingjie Xing mingjie.x...@gmail.com wrote:
Well, it is my understanding that the warning should be emitted for a
volatile variable only if it is not accessed. Initialization means
accessing,
On Nov 8, 2013, at 1:32 AM, Bin.Cheng amker.ch...@gmail.com wrote:
On Fri, Nov 8, 2013 at 5:03 PM, Mike Stump mikest...@comcast.net wrote:
On Nov 7, 2013, at 5:13 PM, Mingjie Xing mingjie.x...@gmail.com wrote:
Well, it is my understanding that the warning should be emitted for a
volatile
On Fri, Nov 8, 2013 at 10:39 AM, Mike Stump mikest...@comcast.net wrote:
On Nov 8, 2013, at 1:32 AM, Bin.Cheng amker.ch...@gmail.com wrote:
On Fri, Nov 8, 2013 at 5:03 PM, Mike Stump mikest...@comcast.net wrote:
On Nov 7, 2013, at 5:13 PM, Mingjie Xing mingjie.x...@gmail.com wrote:
Well, it
On Fri, Nov 8, 2013 at 5:39 PM, Mike Stump mikest...@comcast.net wrote:
On Nov 8, 2013, at 1:32 AM, Bin.Cheng amker.ch...@gmail.com wrote:
On Fri, Nov 8, 2013 at 5:03 PM, Mike Stump mikest...@comcast.net wrote:
On Nov 7, 2013, at 5:13 PM, Mingjie Xing mingjie.x...@gmail.com wrote:
Well, it
Oops, if it is not a bug, please close the report
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57258
Thanks,
Mingjie
2013/11/8 Richard Biener richard.guent...@gmail.com:
On Fri, Nov 8, 2013 at 10:39 AM, Mike Stump mikest...@comcast.net wrote:
On Nov 8, 2013, at 1:32 AM, Bin.Cheng
On Nov 8, 2013, at 2:25 AM, Bin.Cheng amker.ch...@gmail.com wrote:
Thanks for elaborating. The warning message is actually for no-use of
variable, and it has few things to do with whether it's accessed or
not.
I disagree. If you examine why the warning was put in, you realize it was put
in
On Nov 8, 2013, at 2:35 AM, Mingjie Xing mingjie.x...@gmail.com wrote:
Oops, if it is not a bug, please close the report
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57258
Well, I've stated my position. I can be swayed by a good argument, if someone
has one. I'd give people a chance to weigh
- warning_at (DECL_SOURCE_LOCATION (p),
- OPT_Wunused_but_set_variable,
- variable %qD set but not used, p);
+ {
+if (!TREE_THIS_VOLATILE (p))
+ warning_at (DECL_SOURCE_LOCATION (p),
+OPT_Wunused_but_set_variable,
+variable %qD set but not used, p);
+ }
I'd prefer
On Thu, 7 Nov 2013, Mingjie Xing wrote:
2013/11/6 Richard Biener richard.guent...@gmail.com:
You miss a testcase.
Also why should the warning be omitted for unused automatic
volatile variables? They cannot be used in any way.
Richard.
Thanks. I've updated the patch with a test
2013/11/7 Joseph S. Myers jos...@codesourcery.com:
On Thu, 7 Nov 2013, Mingjie Xing wrote:
2013/11/6 Richard Biener richard.guent...@gmail.com:
You miss a testcase.
Also why should the warning be omitted for unused automatic
volatile variables? They cannot be used in any way.
On Wed, Nov 6, 2013 at 8:40 AM, Mingjie Xing mingjie.x...@gmail.com wrote:
Hi,
Changes:
* c/c-decl.c (pop_scope): Skip volatile variables while emit
warnings for unused variables.
Tested on i686-pc-linux-gnu.
OK?
You miss a testcase.
Also why should the warning be omitted for
On Wed, 6 Nov 2013, Mingjie Xing wrote:
* c/c-decl.c (pop_scope): Skip volatile variables while emit
warnings for unused variables.
c/ has its own ChangeLog, so no c/ in the ChangeLog entries.
This patch doesn't include a testsuite addition.
--
Joseph S. Myers
2013/11/6 Richard Biener richard.guent...@gmail.com:
You miss a testcase.
Also why should the warning be omitted for unused automatic
volatile variables? They cannot be used in any way.
Richard.
Thanks. I've updated the patch with a test case.
c/ChangeLog
PR 57258
*
On Thu, Nov 7, 2013 at 11:53 AM, Mingjie Xing mingjie.x...@gmail.com wrote:
2013/11/6 Richard Biener richard.guent...@gmail.com:
You miss a testcase.
Also why should the warning be omitted for unused automatic
volatile variables? They cannot be used in any way.
Richard.
Thanks. I've
Hi,
Changes:
* c/c-decl.c (pop_scope): Skip volatile variables while emit
warnings for unused variables.
Tested on i686-pc-linux-gnu.
OK?
Mingjie
Index: gcc/c/c-decl.c
===
--- gcc/c/c-decl.c (revision 204285)
+++
16 matches
Mail list logo