Go to the FreeLists Home Page Home Signup Help Login
 



Browse haiku: This Month's ArchiveMain Archive PageRelated postsPrevious by DateNext by Date

[openbeos] Re: possible gcc bug ?

  • From: Marcus Overhagen <marcusoverhagen@xxxxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Wed, 29 Jun 2005 00:11:40 +0200 (CEST)
> I found a weird behaviour of gcc. I don't know if it's normal, and I'd like
> someone more "in the know" than me to explain :)
> 
The behaviour is correct.

A reference can only be initialized once

>       int &ref = sInc;
This initialized ref to be an alias of sInc.

>       ref = sDec;
This assignes the value of sDec to ref (and thus also to sInc).

> Am I dumb if I think it should be different or it's a bug in our gcc ?
well, the compiler is doing the correct thing ;)

regards
Marcus

Machen Sie aus 14 Cent spielend bis zu 100 Euro!
Die neue Gaming-Area von Arcor - über 50 Onlinespiele im Angebot.
http://www.arcor.de/rd/emf-gaming-1

Other related posts:

  • [openbeos] possible gcc bug ?
  • [openbeos] Re: possible gcc bug ?
  • [openbeos] Re: possible gcc bug ?
  • [openbeos] Re: possible gcc bug ?
  • [openbeos] Re: possible gcc bug ?
  • [openbeos] Re: possible gcc bug ?




  • [ Home | Signup | Help | Login | Archives | Lists ]

    All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
    Everything else ©2008 Avenir Technologies, LLC.