public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29763] New: Non-ISO template qualifiers
@ 2006-11-08 13:39 s_gccbugzilla at nedprod dot com
2006-11-08 17:24 ` [Bug c++/29763] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: s_gccbugzilla at nedprod dot com @ 2006-11-08 13:39 UTC (permalink / raw)
To: gcc-bugs
Don't suppose you can deprecate this non-ISO C++ standard usage of the
following proprietary G++ extensions:
extern template int max (int, int);
inline template class Foo<int>;
static template class Foo<int>;
... as summarised at http://www.dis.com/gnu/gcc/Template-Instantiation.html.
The problem with these is that they tempt some programmers to use them (a)
without really understanding what they are doing as documentation is somewhat
light on these extensions (b) in the mistaken belief it is standard C++, not a
proprietary G++ extension (c) that non-G++ compilers ignore it, which they may
or may not do in a predictable fashion. As an example, various versions of MSVC
as well as other compilers can throw some odd errors.
I have no problem with these being replaced with something like say:
__attribute__((template_extern)) template int max (int, int);
__attribute__((template_inline)) template class Foo<int>;
__attribute__((template_static)) template class Foo<int>;
This then does not give the illusion that these misuses of extern, inline and
static with template declarations is proper C++.
Cheers,
Niall
--
Summary: Non-ISO template qualifiers
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: s_gccbugzilla at nedprod dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29763
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/29763] Non-ISO template qualifiers
2006-11-08 13:39 [Bug c++/29763] New: Non-ISO template qualifiers s_gccbugzilla at nedprod dot com
@ 2006-11-08 17:24 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-11-08 17:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-11-08 17:23 -------
*** This bug has been marked as a duplicate of 29757 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29763
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-11-08 17:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-11-08 13:39 [Bug c++/29763] New: Non-ISO template qualifiers s_gccbugzilla at nedprod dot com
2006-11-08 17:24 ` [Bug c++/29763] " pinskia at gcc dot gnu dot 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).