public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: corey taylor <corey.taylor@gmail.com>
To: "Magyar, Thomas J. CIV NAVAIR" <thomas.magyar@navy.mil>
Cc: gcc-help@gcc.gnu.org
Subject: Re: gcc v3.4.4; templates and compile errors
Date: Thu, 23 Jun 2005 20:26:00 -0000	[thread overview]
Message-ID: <2e393d0805062313262fb7b7d5@mail.gmail.com> (raw)
In-Reply-To: <81C84C072DC35B4EAFDB67E9347C3D29021AB762@NAEAPAXREX03VA.nadsusea.nads.navy.mil>

I really don't know about that.

You could file a bug report or maybe others here have a response?

corey

On 6/23/05, Magyar, Thomas J.  CIV NAVAIR <thomas.magyar@navy.mil> wrote:
> Thanks for the quick reply. I'm taking a look at that changes documen now.
> 
> I just tried your possible fix by adding the "typename" keyword where you specified. I think I may have tried that before. Here is what happens on that line!!?
> 
> .../SAX/wrappers/saxlibxml2.:310: internal compiler error: Segmentation fault
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <URL:http://gcc.gnu.org/bugs.html> for instructions.
> gmake: *** [../../Include/SAX/wrappers/saxlibxml2.o] Error 1
> 
> 
> That doesn't sound good?!
> 
> Thanks again,
> 
> Tom
> 
> 
> > -----Original Message-----
> > From: corey taylor [mailto:corey.taylor@gmail.com]
> > Sent: Thursday, June 23, 2005 15:36
> > To: Magyar, Thomas J. CIV NAVAIR
> > Cc: gcc-help@gcc.gnu.org
> > Subject: Re: gcc v3.4.4; templates and compile errors
> >
> >
> > It looks like you're missing a "typename" keyword on that line.
> >
> > The reason int works is because that removes the dependency from the
> > template parameters.
> >
> > typename SAX::basic_XMLReader<stringT>::Property<typename
> > SAX::basic_DeclHandler<stringT> *>* prop;
> >
> > More information on this whole requirement is under the C++ section
> > of: http://gcc.gnu.org/gcc-3.4/changes.html
> >
> > corey
> >
> > On 6/23/05, Magyar, Thomas J.  CIV NAVAIR
> > <thomas.magyar@navy.mil> wrote:
> > > In upgrading from gcc v3.3 to gcc v3.4.4 on an SGI IRIX
> > 6.5, I'm having a compile error that I can not figure out.
> > We're trying to build the SAX library, and in one of the
> > files (saxlibxml2.h) there is a function that a line is
> > giving me an error:
> > >
> > > template<class stringT, class string_adapterT>
> > > std::auto_ptr<typename
> > basic_XMLReader<stringT>::PropertyBase>
> > libxml2_wrapper<stringT,
> > string_adapterT>::doGetProperty(const stringT& name)
> > > {
> > >   if(name == properties_.declHandler)
> > >   {
> > > -->
> > SAX::basic_XMLReader<stringT>::Property<SAX::basic_DeclHandler
> > <stringT> *>* prop;
> > >
> > >     prop = new
> > SAX::basic_XMLReader<stringT>::Property<SAX::basic_DeclHandler
> > <stringT>*>(declHandler_);
> > >
> > >     return std::auto_ptr<typename
> > SAX::basic_XMLReader<stringT>::PropertyBase>(prop);
> > >   }
> > >
> > >   ...
> > > }
> > >
> > > The line beginning with SAX:: is giving us this compile error:
> > >
> > > SAX/wrappers/saxlibxml2.h:310: error: expected
> > primary-expression before '*' token
> > >
> > >
> > > Not very helpful really. In playing around with the line of
> > code and trying to narrow it down, I have found out that if I
> > replace all the '<stringT>' in that line (there are 4
> > instances of it) with '<int>' it compiles without warning.
> > But obviously, it won't work as intended. So it is something
> > to do with the 'stringT'. Yet there are other functions in
> > this file that use stringT and with no compile errors.
> > >
> > > Does anyone who is good with templates have any ideas in
> > what I may be missing? I'm only familiar with basic
> > templates...this code is what I call template hell!
> > >
> > > Thanks,
> > >
> > > Tom
> > >
> > >
> >
>

  reply	other threads:[~2005-06-23 20:26 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-23 19:50 Magyar, Thomas J.  CIV NAVAIR
2005-06-23 20:26 ` corey taylor [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-06-24 14:37 Magyar, Thomas J.  CIV NAVAIR
2005-06-24 14:15 Magyar, Thomas J.  CIV NAVAIR
2005-06-24 14:27 ` Peter Doerfler
2005-06-24 14:04 Magyar, Thomas J.  CIV NAVAIR
2005-06-23 19:30 Magyar, Thomas J.  CIV NAVAIR
2005-06-23 19:36 ` corey taylor

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=2e393d0805062313262fb7b7d5@mail.gmail.com \
    --to=corey.taylor@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=thomas.magyar@navy.mil \
    /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).