[Patch draft] Fix libstdc++/8610

Andreas Jaeger aj@suse.de
Tue Oct 21 11:55:00 GMT 2003


Paolo Carlini <pcarlini@unitus.it> writes:

> Paolo Carlini wrote:
>
>> I see, in principle. However, for some reason,, we don't get any warning
>> at build time (-Wall), neither compiling actual code (try the attached
>> test64.cc -Wall -Wextra, f.i.). I don't know exactly /why/ at the moment,
>> I should, but this makes things much easier... ;)
>
> I again Andreas and everyone. A little experiment: try compiling this:
>
> #include <unistd.h>
>
> int main()
> {
>   lseek64(1, 0, 1);
> }

Are we compiling with -D_GNU_SOURCE ?  I think we do - and therefore
it works in libstdc++.  If _GNU_SOURCE is set, we do not eed the
LARGEFILE64_SOURCE.  But the latter might be needed for other
platforms.



> both as an *.cc and as an *.c file. Indeed, as warned by Andreas, the C
> front end spits:
>
> paolo:~> gcc -Wall no-proto.c
> no-proto.c: In function `main':
>
> no-proto.c:5: warning: implicit declaration of function `lseek64'
> no-proto.c:6: warning: control reaches end of non-void function
>
> On the other hand, /nothing/ happens for the C++ front end. I think the
> specifics of C++ about prototypes are making my life easier...

Something must set _GNU_SOURCE or a similar macro,


Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Deutschherrnstr. 15-19, 90429 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20031021/24f67289/attachment.sig>


More information about the Libstdc++ mailing list