[Bug c++/91000] noexcept in constexpr context with std=c++11 and std=c++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91000 --- Comment #4 from Federico Kircheis --- > As I explained in PR 87603 comment 6, and as the patch > https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00466.html says, the old > behaviour triggers unwanted instantiations and so causes valid code to not > compile. Ok, I did not really understood that part of the discussion, I thought it was an issue in the code. The comment states explicitly that the code fails when compiling with c++2a, says nothing about c++11 and c++14 (of course I've could have tested it, my fault). > The old behaviour was not consistently implemented by other compilers so was > never portable anyway. Actually the old behaviour is implemented by GCC<9, MSVC and ICC, clang was the notable exception on my list. Testing with compiler explorer, every compiler that understands c++14 except from gcc9, clang, elcc and zapcc can compile the sample. So it seems to me that the majority got it right. There are bugs where every compiler behaves differently, so it does not seem like a big portability issue. > The C++ committee decided that the old behaviour was > not desirable, and removed it. They removed it from c++17, not from the previous standards, and it has been more by accident than by design (at least that's what I understood, also stated in https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00466.html). > How many reasons do you need? Sorry, but I could not find *the* reason why the behaviour has been changed for the previous standards. The discussion starts with the c++17 change, then shows a failing sample in c++2a, and then it's fixed retroactively for every standard. Since now I've understood that PR 87603 comment 6 is also valid for previous standards I suppose that that's why you meant that the old behaviour is not consistent with the standards. (For the record: it seems that no compiler can compile the code in PR 87603 comment 6 with c++14, so the behaviour is consistent with GCC<9).
[Bug c++/91000] noexcept in constexpr context with std=c++11 and std=c++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91000 --- Comment #3 from Jonathan Wakely --- (In reply to Federico Kircheis from comment #2) > (In reply to Jonathan Wakely from comment #1) > > This would be more appropriate on the gcc-help mailing list, as you're > > asking a question not reporting a bug. > > > > The behaviour is as intended, for all -std versions. The standard was > > changed to remove this feature and no other compilers implemented it anyway. > > Well I'm actually reporting a regression, since g++ is not c++11 and c++14 > standard compliant and it's behaviour changed from previous versions. And as you already know, this is the intended behaviour. > I've discovered through https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603 > that it was not by accident (I guess with dialect are meant the different > c++ versions), but there is no motivation why the regression was introduced > by design. As I explained in PR 87603 comment 6, and as the patch https://gcc.gnu.org/ml/gcc-patches/2019-04/msg00466.html says, the old behaviour triggers unwanted instantiations and so causes valid code to not compile. The old behaviour was not consistently implemented by other compilers so was never portable anyway. The C++ committee decided that the old behaviour was not desirable, and removed it. How many reasons do you need?
[Bug c++/91000] noexcept in constexpr context with std=c++11 and std=c++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91000 --- Comment #2 from Federico Kircheis --- (In reply to Jonathan Wakely from comment #1) > This would be more appropriate on the gcc-help mailing list, as you're > asking a question not reporting a bug. > > The behaviour is as intended, for all -std versions. The standard was > changed to remove this feature and no other compilers implemented it anyway. Well I'm actually reporting a regression, since g++ is not c++11 and c++14 standard compliant and it's behaviour changed from previous versions. I've discovered through https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87603 that it was not by accident (I guess with dialect are meant the different c++ versions), but there is no motivation why the regression was introduced by design.
[Bug c++/91000] noexcept in constexpr context with std=c++11 and std=c++14
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91000 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #1 from Jonathan Wakely --- This would be more appropriate on the gcc-help mailing list, as you're asking a question not reporting a bug. The behaviour is as intended, for all -std versions. The standard was changed to remove this feature and no other compilers implemented it anyway.