public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/82047] non-existent variable template used to initialize variable
[not found] <bug-82047-4@http.gcc.gnu.org/bugzilla/>
@ 2021-08-23 11:40 ` redi at gcc dot gnu.org
2021-08-23 11:42 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-23 11:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2017-08-31 00:00:00 |2021-8-23
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Louis Dionne from comment #7)
> Then, I think there's another bug in GCC (or maybe just a QOI issue), since
> the following code compiles (wandbox[1]):
That's PR 84255
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/82047] non-existent variable template used to initialize variable
[not found] <bug-82047-4@http.gcc.gnu.org/bugzilla/>
2021-08-23 11:40 ` [Bug c++/82047] non-existent variable template used to initialize variable redi at gcc dot gnu.org
@ 2021-08-23 11:42 ` redi at gcc dot gnu.org
1 sibling, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2021-08-23 11:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82047
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |INVALID
Status|NEW |RESOLVED
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to John McFarlane from comment #0)
> The following code compiles:
>
> template<typename T> struct S {};
> template<typename T> constexpr T v;
> constexpr auto c = v<S<void>>;
>
> The result is a variable of type `struct S<void>` which appears to be
> value-initialized.
>
> Expected:
> Compiler emits an error for `c` because there is no such variable as `v` of
> `S` of `void` (or `v` of anything else for that matter).
Clang and EDG agree that the original testcase is valid, probably because they
now implement CWG 253, i.e. what I said in comment 2 and demonstrated in
comment 4.
Not a bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-08-23 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-82047-4@http.gcc.gnu.org/bugzilla/>
2021-08-23 11:40 ` [Bug c++/82047] non-existent variable template used to initialize variable redi at gcc dot gnu.org
2021-08-23 11:42 ` redi 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).