[Bug c++/61372] Add warning to detect noexcept functions that might throw [-Wnoexcept-mismatch]

2024-11-19 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #12 from R. Diez --- I do not agree with the detailed exception specifications. Java tried and such code is hard to maintain. I think all code should generally be able to cope with any exceptions: either handle them, pass them up the

[Bug c++/61372] Add warning to detect noexcept functions that might throw [-Wnoexcept-mismatch]

2024-11-19 Thread dcrocker at eschertech dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #11 from David Crocker --- I've been bitten by this several times. In the absence of support for this type of checking in GCC I added exception checking to our own homebrew static analysis tool. It's already detected three situations

[Bug c++/61372] Add warning to detect noexcept functions that might throw [-Wnoexcept-mismatch]

2024-11-19 Thread rdiez-2006 at rd10 dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #10 from R. Diez --- I have been bitten by this lack of warning before, but GCC 10.5 should be able to issue such a warning by default and has the following option in order to disable the warning: -Wno-terminate (C++ and Objective-C+

[Bug c++/61372] Add warning to detect noexcept functions that might throw [-Wnoexcept-mismatch]

2021-10-26 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 Eric Gallager changed: What|Removed |Added CC||rafael at espindo dot la --- Comment #9

[Bug c++/61372] Add warning to detect noexcept functions that might throw [-Wnoexcept-mismatch]

2021-10-26 Thread egallager at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 Eric Gallager changed: What|Removed |Added CC||egallager at gcc dot gnu.org

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-24 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #7 from Andrew Pinski --- (In reply to Jonathan Wakely from comment #2) > extern "C" functions can throw, so it would be wrong to unconditionally > assume they can't. Yes that is correct. Even extern "C" functions could be written i

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-19 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #6 from Jonathan Wakely --- (In reply to David Crocker from comment #5) > You seem to be assuming that C++ exceptions can propagate through functions > compiled with a C compiler. I'm not assuming anything. I know for a fact that the

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-19 Thread dcrocker at eschertech dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #5 from David Crocker --- You seem to be assuming that C++ exceptions can propagate through functions compiled with a C compiler. On most platforms, they normally cannot, because a C compiler does not produce the information needed fo

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-18 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #4 from Jonathan Wakely --- (In reply to David Crocker from comment #3) > (In reply to Jonathan Wakely from comment #2) > > extern "C" functions can throw, so it would be wrong to unconditionally > > assume they can't. > > True, you

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-18 Thread dcrocker at eschertech dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 --- Comment #3 from David Crocker --- (In reply to Jonathan Wakely from comment #2) > extern "C" functions can throw, so it would be wrong to unconditionally > assume they can't. True, you can write an extern "C" function that throws. But does i

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-17 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 Jonathan Wakely changed: What|Removed |Added Keywords||diagnostic Blocks|

[Bug c++/61372] Add warning to detect noexcept functions that might throw

2020-08-16 Thread dcrocker at eschertech dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61372 David Crocker changed: What|Removed |Added CC||dcrocker at eschertech dot com --- Comme