Re: compiling problem with egcs-1.03a

David Huggins-Daines (bn711@freenet.carleton.ca)
Sun, 22 Nov 1998 15:08:11 -0500

On Sun, Nov 22, 1998 at 02:02:13PM -0500, David Huggins-Daines wrote:
> On Sun, Nov 22, 1998 at 09:48:51AM -0800, David Mosberger-Tang wrote:
> > However, I think the real bug may be in egcs-1.03a. I thought ANSI C
> > allows such assignments to the first member of a union (or is this
> > supposed to be allowed for union initialization only?).
>
> Oh, crud. I goofed. I don't know if it's required by ANSI or not, but
s/required/allowed/ ^^^^^^^^
> it's just plain wrong anyway. I'm very surprised that gcc -Wall didn't
> catch it!

Just to follow up, no, it's not allowed by ANSI. Using the "-pedantic"
flag in gcc gives a warning to that effect. I have no idea why they
decided to make it a compiler error in egcs, though.

-- 
use strict;print&{sub{my(@q)=@_;&{sub{my($p)=@_;&$p($p,@q);}}(sub{my($p)=shift;
@_&&($_[0][0].":".(ref $_[0][1]?"\n".&$p($p,@{$_[0][1]}):$_[0][1])."\n".(&$p(
$p,@_[1..$#_])||''));});}}([name=>'David Huggins-Daines'],[email=>'bn711@free'.
'net.carleton.ca'],[occupation=>[[by_day=>'linguist'],[by_night=>'hacker']]]);

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com