public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "Denis Vnoukov" <imagine@rambler.ru>
To: "cygwin" <cygwin@cygwin.com>
Subject: Re: Combo GCC issues with bugs
Date: Sat, 03 Aug 2019 21:02:00 -0000	[thread overview]
Message-ID: <1564866149.593979.28302.44944@mail.rambler.ru> (raw)
In-Reply-To: <1564865987.561926.25803.36864@mail.rambler.ru>

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...
--
Cheers,
\Denis


  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
  with

  #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
  number,
  > int ndigit, char *buf);but we have a warning about "int-conversion" and get
  core
  > 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:

  https://cygwin.com/faq.html#faq.programming.64bitporting

  Ken

  --
  Problem reports: http://cygwin.com/problems.html
  FAQ: http://cygwin.com/faq/
  Documentation: http://cygwin.com/docs.html
  Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

       reply	other threads:[~2019-08-03 21:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1564865987.561926.25803.36864@mail.rambler.ru>
2019-08-03 21:02 ` Denis Vnoukov [this message]
2019-08-04 15:00   ` Ken Brown
2019-08-02 21:05 Denis Vnoukov
2019-08-03 18:59 ` Ken Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1564866149.593979.28302.44944@mail.rambler.ru \
    --to=imagine@rambler.ru \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).