public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32385] g++ rejects struct in default argument of template function
[not found] <bug-32385-4@http.gcc.gnu.org/bugzilla/>
@ 2011-03-13 1:21 ` jason at gcc dot gnu.org
2021-07-24 1:55 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: jason at gcc dot gnu.org @ 2011-03-13 1:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32385
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-valid-code, |
|monitored |
CC| |jason at gcc dot gnu.org
Target Milestone|4.3.6 |---
Summary|[4.3/4.4/4.5/4.6 |g++ rejects struct in
|regression] ICE with struct |default argument of
|in default argument of |template function
|template function |
--- Comment #7 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-13 01:21:41 UTC ---
Only the ICE was a regression; that's fixed, so this is no longer a regression
bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/32385] g++ rejects struct in default argument of template function
[not found] <bug-32385-4@http.gcc.gnu.org/bugzilla/>
2011-03-13 1:21 ` [Bug c++/32385] g++ rejects struct in default argument of template function jason at gcc dot gnu.org
@ 2021-07-24 1:55 ` pinskia at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-24 1:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32385
--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
clang also rejects this:
<source>:3:34: error: 'A::(unnamed struct at <source>:3:34)' cannot be defined
in a type specifier
template<int> void foo(int = ((struct { int i; }) {0}).i);
^
<source>:3:57: error: member reference base type 'void' is not a structure or
union
template<int> void foo(int = ((struct { int i; }) {0}).i);
~~~~~~~~~~~~~~~~~~~~~~~~~^~
2 errors generated.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-24 1:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-32385-4@http.gcc.gnu.org/bugzilla/>
2011-03-13 1:21 ` [Bug c++/32385] g++ rejects struct in default argument of template function jason at gcc dot gnu.org
2021-07-24 1:55 ` pinskia at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).