public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* [Consult] g++: About "-Wunused-variable" for constant variable in header file
@ 2014-10-14 21:57 Chen Gang
  2014-10-15  9:18 ` Jonathan Wakely
  0 siblings, 1 reply; 3+ messages in thread
From: Chen Gang @ 2014-10-14 21:57 UTC (permalink / raw)
  To: gcc-help; +Cc: Jeff Law, Peter Maydell

Hello All:

At present, I met one warning issue about gcc 5.0.0.

 - For "const float a = 3.4 - 2.1 / 3;", if it is unused, gcc5 will not
   report warning.

 - "const char n() {return 1;}; const a = n();", if 'a' is unused, gcc5
   will report warning.

For gcc old version (e.g. gcc4), it will not report warning. Is it the
new feature for gcc5, or just a gcc5's bug?

Welcome any ideas, suggestions or completions.

Thanks.
-- 
Chen Gang

Open share and attitude like air water and life which God blessed

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-10-15  9:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-14 21:57 [Consult] g++: About "-Wunused-variable" for constant variable in header file Chen Gang
2014-10-15  9:18 ` Jonathan Wakely
2014-10-15  9:29   ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).