public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/13847] New: Additions to the changes.html file for 3.4.
@ 2004-01-24 15:43 mattyt-bugzilla at tpg dot com dot au
2004-01-24 15:47 ` [Bug c++/13847] " pinskia at gcc dot gnu dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: mattyt-bugzilla at tpg dot com dot au @ 2004-01-24 15:43 UTC (permalink / raw)
To: gcc-bugs
Should add the following things to the 3.4 changes.html file. Don't take my
word for it though, just going by what I'm told. I don't know the specifics,
you'll need to get that from someone else.
Befriending and explicitly instantiating typedefs won't work anymore.
Need a "template <>" before templated static variable definitions.
The available function overloadings from a call in a template is determined at
definition time not instantiation time, except for Koenig lookup.
You need to put "class" on explicit instantiations of classes, ie no "template
A<B>;"
--
Summary: Additions to the changes.html file for 3.4.
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mattyt-bugzilla at tpg dot com dot au
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
@ 2004-01-24 15:47 ` pinskia at gcc dot gnu dot org
2004-01-25 16:50 ` giovannibajo at libero dot it
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-24 15:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-01-24 15:47 -------
Confirmed, there are more to document in web site that has changed in 3.4.0 than there is there
now, mostly because the new parser changed a large portion of this.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2004-01-24 15:47:33
date| |
Target Milestone|--- |3.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
2004-01-24 15:47 ` [Bug c++/13847] " pinskia at gcc dot gnu dot org
@ 2004-01-25 16:50 ` giovannibajo at libero dot it
2004-01-25 16:52 ` giovannibajo at libero dot it
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-25 16:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-01-25 16:50 -------
Befriending and explicitly instantiating typedefs won't work anymore.
***********************************************************************
Yes, this could use a changes.html entry. In standardese, GCC 3.4.0 enforces
the standard clause in [basic.lookup.elab]/2 and /3, which talks about
elaborated-type-specifiers (ETS): "If the name lookup finds a typedef-name, the
elaborated-type-specifier is ill-formed."
An ETS is something of the form "class/struct/enum X;". ETS are mainly used for:
- forward declarations (not affected by recent changes).
- friend declarations. Given the bugfix above, GCC 3.4.0 doesn't allow anymore
to befried a class through a typedef name:
class A;
typedef A B;
class C {
friend class B; // ERROR! It used to work.
};
- Explicit instantiations. Again, you can't use typedef names anymore:
template <int> class A {};
typedef A<0> B;
template class B; // ERROR! It used to work.
- As an additional note, ETS are also useful as a workaround if you have a both
a type and a non-type entity bound to the same name.
struct A {};
int A;
void foo(void)
{
A = 0; // OK
A a; // ERROR, lookup finds "int A"
struct A a; // OK, lookup of ETS always finds "struct A".
}
Need a "template <>" before templated static variable definitions.
******************************************************************
This is already documented in changes.html.
The available function overloadings from a call in a template is determined at
definition time not instantiation time, except for Koenig lookup.
******************************************************************************
Ok. I would just say that, in templates, all (modulo bugs) unqualified names
are now looked up in at definition time. This can be added as a rework of the
third C++ entry in changes.html. An example code could be:
void foo(int);
template <int> struct A {
static void bar(void){
foo('a');
}
};
void foo(char);
int main()
{
A<0>::bar(); // Calls foo(int), used to call foo(char).
}
You need to put "class" on explicit instantiations of classes, ie no "template
A<B>;"
******************************************************************************
I didn't even know this was allowed before, must have been a GCC extension. OK,
we can add a entry for this as well.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
2004-01-24 15:47 ` [Bug c++/13847] " pinskia at gcc dot gnu dot org
2004-01-25 16:50 ` giovannibajo at libero dot it
@ 2004-01-25 16:52 ` giovannibajo at libero dot it
2004-01-26 14:34 ` mattyt-bugzilla at tpg dot com dot au
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-01-25 16:52 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-01-25 16:52 -------
Volker, are you willing to do the HTML job here?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
` (2 preceding siblings ...)
2004-01-25 16:52 ` giovannibajo at libero dot it
@ 2004-01-26 14:34 ` mattyt-bugzilla at tpg dot com dot au
2004-02-05 14:53 ` giovannibajo at libero dot it
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: mattyt-bugzilla at tpg dot com dot au @ 2004-01-26 14:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mattyt-bugzilla at tpg dot com dot au 2004-01-26 14:34 -------
>> Need a "template <>" before templated static variable definitions.
> This is already documented in changes.html.
Template specialisations are documented, not static defines.
> Ok. I would just say that, in templates, all (modulo bugs) unqualified names
> are now looked up in at definition time.
Well qualified ones are as well, and that's new ...
> I didn't even know this was allowed before, must have been a GCC extension.
> OK, we can add a entry for this as well.
Actually, I believe this was the norm. See the C++ FAQ Lite for example, which
talks about explicit instantiations and uses no "class".
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
` (3 preceding siblings ...)
2004-01-26 14:34 ` mattyt-bugzilla at tpg dot com dot au
@ 2004-02-05 14:53 ` giovannibajo at libero dot it
2004-02-05 20:04 ` reichelt at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-05 14:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-05 14:53 -------
I forgot to say that, since I were at it, I also added an exhaustive example
about the use of typename/template to disambiguate the parser, and a paragraph
to introduce to the major changes users will face in 3.4.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
` (4 preceding siblings ...)
2004-02-05 14:53 ` giovannibajo at libero dot it
@ 2004-02-05 20:04 ` reichelt at gcc dot gnu dot org
2004-02-08 20:46 ` giovannibajo at libero dot it
2004-02-09 14:06 ` giovannibajo at libero dot it
7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-02-05 20:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From reichelt at gcc dot gnu dot org 2004-02-05 20:04 -------
Giovanni,
the patch is valid XMTHL 1.0 (I just checked).
You don't need a ChangeLog entry for www-patches.
You just have to submit the patch to gcc-patches
(probably with [www-patch] in the title) and wait for approval.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
` (5 preceding siblings ...)
2004-02-05 20:04 ` reichelt at gcc dot gnu dot org
@ 2004-02-08 20:46 ` giovannibajo at libero dot it
2004-02-09 14:06 ` giovannibajo at libero dot it
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-08 20:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-08 20:46 -------
Current revision of the patch is here:
http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00748.html
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |patch
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/13847] Additions to the changes.html file for 3.4.
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
` (6 preceding siblings ...)
2004-02-08 20:46 ` giovannibajo at libero dot it
@ 2004-02-09 14:06 ` giovannibajo at libero dot it
7 siblings, 0 replies; 9+ messages in thread
From: giovannibajo at libero dot it @ 2004-02-09 14:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From giovannibajo at libero dot it 2004-02-09 14:06 -------
changes.html has been updated to reflect your suggestions. Thank you for your
report!
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13847
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2004-02-09 14:06 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-24 15:43 [Bug c++/13847] New: Additions to the changes.html file for 3.4 mattyt-bugzilla at tpg dot com dot au
2004-01-24 15:47 ` [Bug c++/13847] " pinskia at gcc dot gnu dot org
2004-01-25 16:50 ` giovannibajo at libero dot it
2004-01-25 16:52 ` giovannibajo at libero dot it
2004-01-26 14:34 ` mattyt-bugzilla at tpg dot com dot au
2004-02-05 14:53 ` giovannibajo at libero dot it
2004-02-05 20:04 ` reichelt at gcc dot gnu dot org
2004-02-08 20:46 ` giovannibajo at libero dot it
2004-02-09 14:06 ` giovannibajo at libero dot it
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).