[Bug c++/66484] Exception specification can declare a pointer to incomplete type, which is against C++ standard section 15.1

2021-08-05 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66484

Jonathan Wakely  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #4 from Jonathan Wakely  ---
IMO no, a pedwarn is ok, and we shouldn't waste effort on better support for
dynamic exception specs.

[Bug c++/66484] Exception specification can declare a pointer to incomplete type, which is against C++ standard section 15.1

2021-08-04 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66484

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||diagnostic

--- Comment #3 from Andrew Pinski  ---
We have been erroring out with -pedantic-errors since at least GCC 5.1.0.
The question becomes do we want to turn this into a non-pedwarn and do we care
enough about throw() since they are deprecated in C++11 and the default C++
standard in GCC11+ is C++17 where throw() is no longer supported?

[Bug c++/66484] Exception specification can declare a pointer to incomplete type, which is against C++ standard section 15.1

2015-06-10 Thread redi at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66484

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||accepts-invalid
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2015-06-10
 Ever confirmed|0   |1


[Bug c++/66484] Exception specification can declare a pointer to incomplete type, which is against C++ standard section 15.1

2015-06-10 Thread daniel.kruegler at googlemail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66484

Daniel Krügler daniel.kruegler at googlemail dot com changed:

   What|Removed |Added

 CC||daniel.kruegler@googlemail.
   ||com

--- Comment #1 from Daniel Krügler daniel.kruegler at googlemail dot com ---
This could be a possible compiler extension and you get a warning when using
it. What I consider as a defect is that it's not an error even when -pedantic
is activated.

[Bug c++/66484] Exception specification can declare a pointer to incomplete type, which is against C++ standard section 15.1

2015-06-10 Thread msebor at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66484

Martin Sebor msebor at gcc dot gnu.org changed:

   What|Removed |Added

 CC||msebor at gcc dot gnu.org

--- Comment #2 from Martin Sebor msebor at gcc dot gnu.org ---
The relevant text is in 15.4 Exception specifications, p2:

   A type denoted in an exception-specification shall not denote a pointer or
reference to an incomplete type, other than cv void* or a pointer or reference
to a class currently being defined.

The test case below contrasts the diagnostic issued for an ordinary function to
the absence of one for the implicit specialization of the function template.

$ cat u.c  gcc -c -std=c++11 -xc++ u.c
struct S;

void f () throw (S*);

template class T void g () throw (T);

void foo () {
gS*();
}
u.c:3:19: warning: invalid use of incomplete type ‘struct S’
 void f () throw (S*);
   ^
u.c:1:8: warning: forward declaration of ‘struct S’
 struct S;
^