This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/71797] Spurious unused-variable warning with inline function and unrelated error


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71797

Eric Gallager <egallager at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic
             Status|UNCONFIRMED                 |RESOLVED
                 CC|                            |egallager at gcc dot gnu.org
         Resolution|---                         |WORKSFORME

--- Comment #1 from Eric Gallager <egallager at gcc dot gnu.org> ---
I can't reproduce this bug; only the error is printed, with no warning for me:

$ /usr/local/bin/g++ -c -Wall -Wunused-const-variable=2 -Wextra -pedantic
71797.cc
71797.cc: In constructor ‘Foo::Foo()’:
71797.cc:8:13: error: ‘create_a_compile_error’ was not declared in this scope
     Foo() { create_a_compile_error; };
             ^~~~~~~~~~~~~~~~~~~~~~
$

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]