[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] andre compilere end g++ ???



On Fri, 7 Feb 2003, Marc Cromme wrote:

[..namespaces..]

> Jeg synes faktisk at G++ er for god til det - jeg har ofte oplevet at den
> for eksempel tillader direkte at skrive til cout, selvom det rettelig
> burde hedde std::cout - og lignende ting. Jeg kunne godt tænke mig at den
> var lidt striksere på det punkt.

Indtil 3.0 var den rimeligt blød, og hvis du inkluderer noget der ender 
.h, risikerer du jo at åbne alle namespaces - men det er du nok klar over.

> Jo, men også kode kompileret med disse options kan have fejl. Jeg lavede
> lige en i går med noget pointer-rod, hvor jeg newede en pointer, for at
> overskrive den med en anden, og delete den første - en rigtig god torsk.
> G++ kompilerede og kørte programmet fejlfrit - på en linux box - og
> kompilerede, men core dumpede på en anden linux box, som den burde gøre.
> De var spøjst! Tak til dem der hjalp mig med at finde programmerings-fejlen...

Det er der vel ikke noget usædvanligt i, er der? Hvis du laver

ObjectT * object = new ObjectT();
ObjectT * foo = object;
delete object;
foo->someMethod();

så er hvad der sker vel _udefineret_, ikke defineret som en runtime fejl, 
eller hvordan?

Mads

-- 
Mads Bondo Dydensborg.                               sslug@sslug
I found the internet, but it was an air-conditioned nightmare.

             - http://c2.com/cgi/wiki?FinallyFoundTheInternet



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:09 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *