public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9851: [3.4 regression] confusing error message when using '.', not '->'
@ 2003-05-04 23:56 Giovanni Bajo
  0 siblings, 0 replies; 2+ messages in thread
From: Giovanni Bajo @ 2003-05-04 23:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/9851; it has been noted by GNATS.

From: "Giovanni Bajo" <giovannibajo@libero.it>
To: <gcc-gnats@gcc.gnu.org>,
	<oldham@codesourcery.com>,
	<gcc-bugs@gcc.gnu.org>,
	"Mark Mitchell" <mark@codesourcery.com>,
	<nobody@gcc.gnu.org>,
	<gcc-prs@gcc.gnu.org>
Cc:  
Subject: Re: c++/9851: [3.4 regression] confusing error message when using '.', not '->'
Date: Mon, 5 May 2003 01:53:06 +0200

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9851
 
 As a reference, with Comeau I get:
 
 "pr9851.cpp", line 6: error: expression must have class type
         foo () { g_.do_nothing (); }
                  ^
 
 which is not bad but probably I prefer the one in GCC before 3.4. With MSVC,
 I get:
 
 pr9851.cpp
 pr9851.cpp(6) : error C2228: left of '.do_nothing' must have
 class/struct/union type
         type is 'goo *'
         did you intend to use '->' instead?
 
 which is nice.
 
 Giovanni Bajo
 


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: c++/9851: [3.4 regression] confusing error message when using '.', not '->'
@ 2003-02-26 17:14 bangerth
  0 siblings, 0 replies; 2+ messages in thread
From: bangerth @ 2003-02-26 17:14 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, mark, nobody, oldham

Old Synopsis: confusing error message when using '.', not '->'
New Synopsis: [3.4 regression] confusing error message when using '.', not '->'

State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Feb 26 17:14:33 2003
State-Changed-Why:
    Confirmed. Not very helpful. For reference (so that one
    does not have to open the attachment): code is
    -----------------------
    struct goo {
      void do_nothing () {};
    };
    
    struct foo {
      foo () { g_.do_nothing (); }
      goo * g_;
    };
    ---------------------
    and we get
    
    g/x> /home/bangerth/bin/gcc-3.4-pre/bin/c++ -c x.cc
    x.cc: In constructor `foo::foo()':
    x.cc:6: error: expected type-name
    x.cc:6: error: expected `::'
    x.cc:6: error: expected `~'
    x.cc:6: error: expected identifier
    
    This can be considered a regression, since previously
    we got this:
    g/x> /home/bangerth/bin/gcc-3.3-pre/bin/c++ -c x.cc
    x.cc: In constructor `foo::foo()':
    x.cc:6: error: request for member `do_nothing' in `this->foo::g_', which is of
       non-aggregate type `goo*'

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9851


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-05-04 23:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-04 23:56 c++/9851: [3.4 regression] confusing error message when using '.', not '->' Giovanni Bajo
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26 17:14 bangerth

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).