sane-project-website/old-archive/1998-11/0206.html

58 wiersze
2.9 KiB
HTML

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

<!-- received="Sun Nov 22 12:02:12 1998 PST" -->
<!-- sent="Sun, 22 Nov 1998 15:08:11 -0500" -->
<!-- name="David Huggins-Daines" -->
<!-- email="bn711@freenet.carleton.ca" -->
<!-- subject="Re: compiling problem with egcs-1.03a" -->
<!-- id="" -->
<!-- inreplyto="19981122140213.A355@overlord.@" -->
<title>sane-devel: Re: compiling problem with egcs-1.03a</title>
<h1>Re: compiling problem with egcs-1.03a</h1>
<b>David Huggins-Daines</b> (<a href="mailto:bn711@freenet.carleton.ca"><i>bn711@freenet.carleton.ca</i></a>)<br>
<i>Sun, 22 Nov 1998 15:08:11 -0500</i>
<p>
<ul>
<li> <b>Messages sorted by:</b> <a href="date.html#206">[ date ]</a><a href="index.html#206">[ thread ]</a><a href="subject.html#206">[ subject ]</a><a href="author.html#206">[ author ]</a>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0207.html">Christian Reiser: "Re: SANE v1.00 is out!"</a>
<li> <b>Previous message:</b> <a href="0205.html">Danilo Godec: "Re: The Primax Scanner Driver Project for Linux/UN*X homepage started"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>
<!-- body="start" -->
On Sun, Nov 22, 1998 at 02:02:13PM -0500, David Huggins-Daines wrote:<br>
<i>&gt; On Sun, Nov 22, 1998 at 09:48:51AM -0800, David Mosberger-Tang wrote:</i><br>
<i>&gt; &gt; However, I think the real bug may be in egcs-1.03a. I thought ANSI C</i><br>
<i>&gt; &gt; allows such assignments to the first member of a union (or is this</i><br>
<i>&gt; &gt; supposed to be allowed for union initialization only?).</i><br>
<i>&gt; </i><br>
<i>&gt; Oh, crud. I goofed. I don't know if it's required by ANSI or not, but</i><br>
s/required/allowed/ ^^^^^^^^<br>
<i>&gt; it's just plain wrong anyway. I'm very surprised that gcc -Wall didn't</i><br>
<i>&gt; catch it!</i><br>
<p>
Just to follow up, no, it's not allowed by ANSI. Using the "-pedantic"<br>
flag in gcc gives a warning to that effect. I have no idea why they<br>
decided to make it a compiler error in egcs, though.<br>
<p>
<pre>
--
use strict;print&amp;{sub{my(@q)=@_;&amp;{sub{my($p)=@_;&amp;$p($p,@q);}}(sub{my($p)=shift;
@_&amp;&amp;($_[0][0].":".(ref $_[0][1]?"\n".&amp;$p($p,@{$_[0][1]}):$_[0][1])."\n".(&amp;$p(
$p,@_[1..$#_])||''));});}}([name=&gt;'David Huggins-Daines'],[email=&gt;'bn711@free'.
'net.carleton.ca'],[occupation=&gt;[[by_day=&gt;'linguist'],[by_night=&gt;'hacker']]]);
<p>
<pre>
--
Source code, list archive, and docs: <a href="http://www.mostang.com/sane/">http://www.mostang.com/sane/</a>
To unsubscribe: echo unsubscribe sane-devel | mail <a href="mailto:majordomo@mostang.com">majordomo@mostang.com</a>
</pre>
<!-- body="end" -->
<p>
<ul>
<!-- next="start" -->
<li> <b>Next message:</b> <a href="0207.html">Christian Reiser: "Re: SANE v1.00 is out!"</a>
<li> <b>Previous message:</b> <a href="0205.html">Danilo Godec: "Re: The Primax Scanner Driver Project for Linux/UN*X homepage started"</a>
<!-- nextthread="start" -->
<!-- reply="end" -->
</ul>