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++/71909] [4.9/5/6/7 Regression] g++ accepts an unreachable function catch block that lacks a corresponding try


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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org
            Summary|g++ accepts an unreachable  |[4.9/5/6/7 Regression] g++
                   |function catch block that   |accepts an unreachable
                   |lacks a corresponding try   |function catch block that
                   |                            |lacks a corresponding try

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 3.2 and 3.3 rejected this:
b.C:6: error: syntax error before `catch'
b.C:8: error: missing ';' before right brace
b.C:9: error: syntax error before `}' token
So must have been introduced during the C++ parser rewrite.

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