[C++] template instantiated from messages

Nathan Sidwell nathan@codesourcery.com
Wed Apr 19 10:36:00 GMT 2000


Hi,
Something's killed the `instantiated from' stack when issuing
a diagnostic on template instantiation. This is irksome.
Attached is a file which now says,

GNU C++ version 2.96 20000416 (experimental) (i686-pc-linux-gnu)
compiled by GNU C version 2.96 20000416 (experimental).
nathan125.C: In function `void foo (T) [with T = int]':
nathan125.C:4:   instantiated from here
nathan125.C:3: request for member `i' in `arg', which is of
nathan125.C:3: non-aggregate type `int'

rather than the more contextful output of 2.95.2

GNU C++ version 2.95.2 19991024 (release) (i686-pc-linux-gnu) compiled
by GNU C version 2.95.1 19990816 (release).
nathan125.C: In function `void foo<int>(int)':
nathan125.C:4:   instantiated from `bar<int>(int)'
nathan125.C:5:   instantiated from `baz<int>(int)'
nathan125.C:9:   instantiated from here
nathan125.C:3: request for member `i' in `arg', which is of
non-aggregate type `int'

I think this regression happened in the last month or so (but I may
have misremembered the last time before this when I update my development
compiler).

Unfortunately for me I can't go back to an earlier gcc, as they die in
other places on my code :-(

nathan

-- 
Dr Nathan Sidwell   ::   http://www.codesourcery.com   ::   CodeSourcery LLC
         'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org


template <class T> void foo (T arg) {arg.i;}
template <class T> void bar (T arg) {foo (arg);}
template <class T> void baz (T arg) {bar (arg);}

void bink ()
{
  baz (1);
}


More information about the Gcc-bugs mailing list