Sun Oct 25 17:41:00 GMT 1998
My intention was not to find a shortest possible demonstration of any
bug, I just happened to come across this particular bug quite
accidentally. And, BTW, what's so undefined about my program's behavior?
On Sun, 25 Oct 1998 21:17:38 +0100, you wrote:
>Dima Volodin wrote:
>> The same thing w/o -O works OK. This one was tested on Solaris x86 and
>> Solaris Sparc. The results are absolutely the same.
>Well, you program invokes undefined behaviour and thus ins't garantied
>to compile anyway. Here is a program which doesn't invoke undefined
>behaviour and is way shorter:
> virtual void foo () = 0;
>int main ()
> struct Der : Base
> void foo ()
> } l;
>reference to `foo__Q26main.0_3Der.2'
>collect2: ld returned 1 exit status
>when compiled with -O. Version is:
>Reading specs from
>gcc version egcs-2.91.45 19980704 (gcc2 ss-980609 experimental)
>Valentin Bonnard mailto:email@example.com
>info about C++/a propos du C++: http://pages.pratique.fr/~bonnardv/
More information about the Gcc-bugs