| delorie.com/archives/browse.cgi | search |
| X-Authentication-Warning: | delorie.com: mail set sender to geda-user-bounces using -f |
| X-Recipient: | geda-user AT delorie DOT com |
| X-Envelope-From: | paubert AT iram DOT es |
| Date: | Wed, 24 Sep 2014 10:17:04 +0200 |
| From: | Gabriel Paubert <paubert AT iram DOT es> |
| To: | geda-user AT delorie DOT com |
| Subject: | Re: [geda-user] Banging my head against the guile-for-windows wall |
| Message-ID: | <20140924081704.GA32079@visitor2.iram.es> |
| References: | <20140923045453 DOT 56dc3de2 AT akka> |
| <CAOuGh8_bfL2KJDLt-qkU7v0wS3UBkbHeej6ScVLJJfHnOR_6oQ AT mail DOT gmail DOT com> | |
| <lvssr7$lun$1 AT ger DOT gmane DOT org> | |
| <5421FF2E DOT 4010709 AT sbcglobal DOT net> | |
| <lvtcdd$53a$1 AT ger DOT gmane DOT org> | |
| <20140924040432 DOT 22429 DOT qmail AT stuge DOT se> | |
| <20140924062143 DOT GA21949 AT visitor2 DOT iram DOT es> | |
| <201409240635 DOT s8O6ZqOw019084 AT envy DOT delorie DOT com> | |
| MIME-Version: | 1.0 |
| In-Reply-To: | <201409240635.s8O6ZqOw019084@envy.delorie.com> |
| User-Agent: | Mutt/1.5.21 (2010-09-15) |
| X-Spamina-Bogosity: | Unsure |
| X-Spamina-Spam-Score: | -0.2 (/) |
| X-Spamina-Spam-Report: | Content analysis details: (-0.2 points) |
| pts rule name description | |
| ---- ---------------------- -------------------------------------------------- | |
| -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP | |
| 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% | |
| [score: 0.5004] | |
| Reply-To: | geda-user AT delorie DOT com |
| Errors-To: | nobody AT delorie DOT com |
| X-Mailing-List: | geda-user AT delorie DOT com |
| X-Unsubscribes-To: | listserv AT delorie DOT com |
On Wed, Sep 24, 2014 at 02:35:52AM -0400, DJ Delorie wrote: > > > > This is ugly but if void * and int are the same size it is harmless. > > I've seen way too many platforms where pointers and "int" are > different sizes, to give this one a pass... > > Worse, on the msp430, large-model pointers are neither int-sized nor > long-sized. Not that gEDA will ever run on an msp430 ;-) > > > I consider this one a spurious warning, it may probably be silenced by inserting > > an useless and ugly cast, but I really wonder on which drugs the compiler > > writers were when they decided to add it. You should always be able to pass > > a non-const argument to a const parameter. > > You're confusing a const argument with an argument which is a *pointer > to* a const value. It's the latter that gcc is warning about, because > the pointed-to types are different. No, I don't confuse them, I just disagree with the warning. > > One could still argue that gcc should ignore pointer-to-nonconst > passed as pointer-to-const (and perhaps the trunk gcc does) but > otherwise the logic is sane - the pointers point to different types. Not different enough to elicit a warning IMHO. > It's like passing "struct foo *" when the function wants "struct bar *". That's where I disagree. Having to add a casts to eliminate this warning makes the source code uglier without any real benefit.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |