comp.lang.ada
 help / color / mirror / Atom feed
From: "Warren W. Gay VE3WWG" <ve3wwg@home.com>
Subject: Re: avl tree - booch components
Date: Fri, 14 Sep 2001 16:47:24 GMT
Date: 2001-09-14T16:47:24+00:00	[thread overview]
Message-ID: <3BA2349B.4010807@home.com> (raw)
In-Reply-To: x7vk7z1bz61.fsf@galadriel.frlngtn.gecm.com

Simon Wright wrote:

> "Warren W. Gay VE3WWG" <ve3wwg@home.com> writes:
>>Jeffrey Carter wrote:
>>
>>>Unless the constant is never referenced, and your compiler optimizes it
>>>away.
>>>
>>That has never been my experience under GNAT, and never my
>>experience under C/C++.
> 
> With foo.cc containing
> 
>   static const char rcsid[] = "hello world";
>   int main()
>   {
>     return 0;
>   }
> 
> I get
> 
>   orm[410]$ c++ -v
>   Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/egcs-2.91.66/specs
>   gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
>   orm[411]$ c++ -O2 foo.cc
>   orm[412]$ strings a.out | grep hello
>   orm[413]$ c++ foo.cc
>   orm[414]$ strings a.out | grep hello
>   hello world
> 
> (but gcc retains the string even with -O2)


Ouch! You're right. This doesn't happen under HPUX with their C++

compiler, but obviously gcc is behaving differently.
-- 
Warren W. Gay VE3WWG
http://members.home.net/ve3wwg




  reply	other threads:[~2001-09-14 16:47 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-07  8:16 avl tree - booch components Tony Gair
2001-09-07 11:47 ` Des Walker
2001-09-07 14:51   ` Simon Wright
2001-09-07 22:04     ` Ehud Lamm
2001-09-07 23:59     ` Des Walker
2001-09-08 13:58       ` Tony Gair
2001-09-09  8:49 ` Dave Parsons
2001-09-09 18:27   ` Simon Wright
2001-09-09 19:22     ` Simon Wright
2001-09-12  7:48       ` Dave Parsons
2001-09-09 21:01     ` Dave Parsons
2001-09-10  6:59     ` Dave Parsons
2001-09-26 14:00       ` Tony Gair
2001-09-10  6:59     ` Dave Parsons
2001-09-10 16:21     ` Stephen Leake
2001-09-10 19:18       ` Pascal Obry
2001-09-11  5:45         ` Simon Wright
2001-09-12  9:02           ` David C. Hoos, Sr.
2001-09-12 10:37             ` Florian Weimer
2001-09-13  5:51               ` Simon Wright
2001-09-11  5:53       ` Simon Wright
2001-09-12  9:10         ` David C. Hoos, Sr.
2001-09-12 14:42           ` Warren W. Gay VE3WWG
2001-09-13  5:57             ` Simon Wright
2001-09-13 13:49             ` Georg Bauhaus
2001-09-13 22:12               ` Jeffrey Carter
2001-09-14 13:38                 ` Warren W. Gay VE3WWG
2001-09-14 14:54                   ` Simon Wright
2001-09-14 16:47                     ` Warren W. Gay VE3WWG [this message]
2001-09-14 13:59                 ` Marin David Condic
2001-09-14 14:08                   ` Marin David Condic
2001-09-14 16:50                     ` Warren W. Gay VE3WWG
2002-02-25 14:04     ` Dave Parsons
2002-02-26  1:05       ` Matthew Heaney
2001-09-10 21:52 ` Jeffrey D. Cherry
2001-09-10 21:53 ` Jeffrey D. Cherry
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox