www.delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mailnull set sender to djgpp-workers-bounces using -f |
From: | sandmann AT clio DOT rice DOT edu (Charles Sandmann) |
Message-Id: | <10202071825.AA14352@clio.rice.edu> |
Subject: | Re: conflicting types for bzero (gcc303) |
To: | djgpp-workers AT delorie DOT com |
Date: | Thu, 7 Feb 2002 12:25:19 -0600 (CST) |
Cc: | eliz AT is DOT elta DOT co DOT il (Eli Zaretskii), ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De, |
pavenis AT lanet DOT lv | |
In-Reply-To: | <1013078746.9713.25.camel@bender.falconsoft.be> from "Tim Van Holder" at Feb 07, 2002 11:45:45 AM |
X-Mailer: | ELM [version 2.5 PL2] |
Mime-Version: | 1.0 |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
Okay, bzero only generates warnings (no errors) if: 1) GCC 3.x, AND 2) Only if -I /djgpp/include is used 3) and -fno-builtin not specified Do we do anything to the refresh at all? (It's fixed in CVS and has been for quite some time). If we wanted to remove warning: A quick test of Andris's suggestion (in a GNUC 3 ifdef) : #define bzero(s,n) __builtin_bzero(s,n) Also seemed to work fine (even with -fno-builtin) Note that if we make this change we always use the builtin with GCC 3.x; if we don't we always seem to generate code for our libc bzero (backward compatible but gives occasional warning). So a simple string.h ifdef for __GNUC__ >=3 to use the above instead of our prototype would fix the warning - and upgrade you to posix behavior using GCC 3.x. While this would still break anyone trying to use a return argument, they probably need to make other code changes for GCC 3.x anyway, or could use 2.x. This then asks - should we be using more builtins in the headers for CVS? There was also a discussion about bcopy - but this doesn't seem to generate any warnings with GCC 3.03 that I saw - so I don't see a reason to mess with it in any case. (Just confusion with the bzero issue, or something else?)
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |