public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Lots of bugs in <limits.h> ?
@ 2002-12-30 14:47 Neil Booth
  2002-12-30 15:46 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Booth @ 2002-12-30 14:47 UTC (permalink / raw)
  To: gcc

Reading the C standard carefully leads me to believe that the macros
like

UINT_MAX, LONG_MIN

etc. should be values, and not typed integer constants like "65535U"
nor expressions like "(-LONG_MAX - 1)".

My attention was drawn to this fact by a comment on Dinkumware's
website about Glibc's not being standards conforming because if such
macros are passed to other macros like UINT64_C they produce
preprocessor or parser errors because suffixes like "LL" are appended
to the original macros.  My reading of the C standard is that it is
indeed intended that this should be possible.

Do others agree?

If so, for GCC we need to fix <limits.h>, as well as some bits of
c-common.c.

Neil.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-12-30 20:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-30 14:47 Lots of bugs in <limits.h> ? Neil Booth
2002-12-30 15:46 ` Joseph S. Myers
2002-12-30 18:01   ` Neil Booth

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).