public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Guenther <rguenth@tat.physik.uni-tuebingen.de>
To: Mark Mitchell <mark@codesourcery.com>
Cc: Phil Edwards <phil@jaj.com>, "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Subject: Re: Another new-parser problem? (libstdc++)
Date: Tue, 21 Jan 2003 19:10:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.33.0301211429190.19303-101000@bellatrix.tat.physik.uni-tuebingen.de> (raw)
In-Reply-To: <50220000.1042824273@warlock.codesourcery.com>

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2557 bytes --]

On Fri, 17 Jan 2003, Mark Mitchell wrote:

> --On Friday, January 17, 2003 05:15:37 PM +0100 Richard Guenther
> <rguenth@tat.physik.uni-tuebingen.de> wrote:
>
> > Ok, a "simple" testcase is attached (unincluded output from -save-temps
> > .ii file, line-numbers and blank lines removed, etc.). To reproduce
> > simply do
>
> This file still has #include's in it; would you please send me the .ii
> file you get from "g++ -save-temps -c ..."?

I simplified the testcase (.ii.gz attached) and re-checked with g++ (GCC)
3.4 20030121 (experimental):

The funy thing is, once I change the notify() invocation to

    Observable<T*>::notify((int)notifyUncompress);

the testcase works. Wasnt an enum convertible to int? And why does it fail
in std::vector if it isnt? Seems to be some lookup problem.

Thanks, Richard.

Btw. reducing the testcase I stombled on PR c++/9384 which is an ICE
on illegal code (selected ICE on legal code errornously - perhaps someone
could change that).


#include <vector>
template <class T>
struct Observer {};
template<class T>
struct Observable
{
  void notify(int event);
  std::vector<Observer<T> *> observers_m;
};
template <class T>
struct CompressibleBlock
{
  enum Notifier { notifyUncompress = 1 };
  void uncompressUnlocked()
  {
     Observable<T*>::notify(notifyUncompress);
  }
};

~/ix86/gcc3.4/bin/g++ -c
~/src/pooma-bugfixes/r2/src/Engine/CompressibleBlock.ii.h -save-temps
/home/rguenth/ix86/gcc3.4/include/c++/3.4/bits/stl_vector.h: In
instantiation of `std::_Vector_alloc_base<Observer<T*>*,
std::allocator<Observer<T*>*>, std::_Alloc_traits<Observer<T*>*,
std::allocator<Observer<T*>*> >::_S_instanceless>':
/home/rguenth/src/pooma-bugfixes/r2/src/Engine/CompressibleBlock.ii.h:8:
instantiated from `std::_Vector_base<Observer<T*>*,
std::allocator<Observer<T*>*> >'
/home/rguenth/src/pooma-bugfixes/r2/src/Engine/CompressibleBlock.ii.h:8:
instantiated from `std::vector<Observer<T*>*,
std::allocator<Observer<T*>*> >'
/home/rguenth/src/pooma-bugfixes/r2/src/Engine/CompressibleBlock.ii.h:8:
instantiated from `Observable<T*>'
/home/rguenth/src/pooma-bugfixes/r2/src/Engine/CompressibleBlock.ii.h:16:
instantiated from here
/home/rguenth/ix86/gcc3.4/include/c++/3.4/bits/stl_vector.h:91: error: `
   std::_Vector_alloc_base<_Tp, _Allocator, _IsStatic>::_M_data_allocator'
has
   incomplete type
/home/rguenth/ix86/gcc3.4/include/c++/3.4/bits/stl_vector.h:91: confused
by earlier errors, bailing out



--
Richard Guenther <richard.guenther@uni-tuebingen.de>
WWW: http://www.tat.physik.uni-tuebingen.de/~rguenth/


[-- Attachment #2: testcase --]
[-- Type: APPLICATION/octet-stream, Size: 35493 bytes --]

  reply	other threads:[~2003-01-21 13:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-01-17 16:26 Richard Guenther
2003-01-17 18:40 ` Phil Edwards
2003-01-17 19:09   ` Richard Guenther
2003-01-17 20:03     ` Mark Mitchell
2003-01-21 19:10       ` Richard Guenther [this message]
2003-01-21 20:23       ` Richard Guenther

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.33.0301211429190.19303-101000@bellatrix.tat.physik.uni-tuebingen.de \
    --to=rguenth@tat.physik.uni-tuebingen.de \
    --cc=gcc@gcc.gnu.org \
    --cc=mark@codesourcery.com \
    --cc=phil@jaj.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).