Re: Does GCC 3.4 fix this bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 11, 2003 at 11:46:56AM -0500, Eljay Love-Jensen wrote:
> Date: Thu, 11 Sep 2003 11:46:56 -0500
> From: Eljay Love-Jensen <eljay@xxxxxxxxx>
> In-reply-to: <20030911163705.GA19868@xxxxxxxxxx>
> X-Sender: eljay@xxxxxxxxxxxxxxxxxxxxxxx
> To: Oliver Kullmann <O.Kullmann@xxxxxxxxxxxxx>, gcc-help@xxxxxxxxxxx
> X-Mailer: QUALCOMM Windows Eudora Version 5.2.1
> X-SA-Exim-Mail-From: eljay@xxxxxxxxx
> Subject: Re: Does GCC 3.4 fix this bug?
> X-Spam-Checker-Version: SpamAssassin 2.60-rc1 (1.197-2003-08-21-exp) on mhs
> X-Spam-Level: 
> X-Spam-Status: No, hits=0.0 required=5.5 tests=none autolearn=no version=2.60-rc1
> X-SA-Exim-Version: 3.1 (built Fri Aug 22 12:30:01 GMT 2003)
> X-UIDL: <k!"!(\G"!a@j"!0L("!
> 
> Hi Oliver,
> 
> Even when doing...
>   auto Bar quux(Foo());
> ...it still takes it as a declaration instead of a definition.  That doesn't seem kosher at all.
> 
> --Eljay
> 
>

I'm not sure about the exact syntax regarding storage specifiers like auto, however I'm quite
sure that for the first example you gave as a bug g++ is absolutely correct (and other compilers,
if accepting the construction, are not): Have a look into Section 8.2 of the standard.
(There is also a section in one of Scott Myers books about it, called something like
"C++ most vexing parse").
I would guess adding something like auto shouldn't change much.

The solution using double brackets is not mentioned in the standard, but I believe it's
perfectly correct (I think it's in Myers book), and can be used in other circumstances too:

Always when you see suddenly this function-pointer-brackets showing up in error messages,
then it's a variation of the same old problem! (I experience these problems roughly once
a month.)

Oliver
 


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux