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++/72845] gcc crashes (ICE) when compiling program with complex noexcept declaration


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

Markus Trippelsdorf <trippels at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-08-09
                 CC|                            |trippels at gcc dot gnu.org
     Ever confirmed|0                           |1
      Known to fail|                            |5.4.0, 6.1.0, 7.0

--- Comment #1 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
template <typename> struct g { static const int h = 0; };
template <typename i> void declval() { static_assert(!g<i>::h,""); }
template <typename> struct a {
  template <typename d, typename c>
  friend auto f(d &&, c &&) noexcept(declval<c>) -> decltype(declval<c>);
};
template <typename d, typename c> auto f(d &&, c &&) -> decltype(declval<c>);
struct e {};
static_assert((e{}, declval<a<int>>),"");

Clang accepts the code. Might be related to PR71784.

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