[Bug c++/67858] g++-5.1.1 warns about unused variable only when optimization flag is used

2015-10-05 Thread crayzeewulf at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67858 --- Comment #1 from crayzeewulf --- Here is the compiler command line and the warning: $ g++ -Wall -std=c++11 -O3 -c bug_demo_code.cpp bug_demo_code.cpp:34:27: warning: ‘container’ defined but not used [-Wunused-variable] const std::array cont

[Bug c++/67858] New: g++-5.1.1 warns about unused variable only when optimization flag is used

2015-10-05 Thread crayzeewulf at gmail dot com
: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: crayzeewulf at gmail dot com Target Milestone: --- Created attachment 36446 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36446&action=edit Code that demostrates