This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Combo GCC issues with bugs

Yes, gcvt is legacy. But there is no one Linux distribution which has no gcvt in
the world.
Moreover gcvt present into MSVC, Intel C, mingw, etc..
It is true to have gcvt with right declaration.
FD_ZERO(&read_fd); <== with -Wold-style-cast produced real bogus and suspicious
warning which looks like bug
GetTickCount64(); <== recommended part of WINAPI and must be avail via windows.h
_BitScanReverse64 and _BitScanForward64 must be with "unsigned long *":
unsigned char _BitScanForward64(
unsigned long * Index,
unsigned __int64 Mask
due to ms specification as well...

 The Linux man page for gcvt says, "Marked as LEGACY in POSIX.1-2001.
 POSIX.1-2008 removes the specification of gcvt(), recommending the use of
 sprintf(3) instead (though snprintf(3) may be preferable)."

 Cygwin's stdlib.h is consistent with this. It guards the declaration of gcvt

 #if __XSI_VISIBLE >= 4 && __POSIX_VISIBLE < 200112

 If you really need to use gcvt, I think you probably have to #define
 _XOPEN_SOURCE to be 500. (I haven't tested this.)

 > 2. gcvt function in all standards has declaration like:char *gcvt(double
 > int ndigit, char *buf);but we have a warning about "int-conversion" and get
 > dump on line:printf("buffer: %s", str);

 This is a consequence of the fact that gcvt hasn't been declared.

 I haven't looked at the rest of the warnings/errors in your message, but I
 suspect you can figure out the causes yourself by looking at the relevant
 headers and/or by looking at the result of preprocessing. You might also find
 the following helpful:


 Problem reports:
 Unsubscribe info:

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]