public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/60858] New: 64-bit multi-character constants
@ 2014-04-16  8:25 swissp2013 at gmail dot com
  2014-04-16  8:32 ` [Bug c/60858] " pinskia at gcc dot gnu.org
  2014-07-25 19:20 ` [Bug preprocessor/60858] " 3dw4rd at verizon dot net
  0 siblings, 2 replies; 3+ messages in thread
From: swissp2013 at gmail dot com @ 2014-04-16  8:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60858

            Bug ID: 60858
           Summary: 64-bit multi-character constants
           Product: gcc
           Version: 4.10.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: swissp2013 at gmail dot com

Hello All,

There are several real-life cases for 64-bit multi-character constants (ie:
hash tables) that are better handled by the pre-processor (before machine code
generation).

It is trivial for GCC users to resolve the 'per-implementation' behavior
(big-endian vs ...) but they need 64-bit support in the first place.

Currently, a macro has been used to concatenate 32-bit values but this is
adding unecessary bloat in people's C source code.

The GCC 'enhancement' is trivial to make:
---------------------------------------------------------
in gcc-4.9-20140406/libcpp/charset.c:

line 1482:
- size_t max_chars = CPP_OPTION (pfile, int_precision) / width;
+ size_t max_chars = (CHAR_BIT * sizeof (long long int)) / width;

line 1529:
- width = CPP_OPTION(pfile, int_precision);
- width = (CHAR_BIT * sizeof (long long int)) / width;
---------------------------------------------------------

This change won't break existing code - and the warnings will remain - so there
is only a benefit for greybeards like us.

Thank you for your consideration.


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

end of thread, other threads:[~2014-07-25 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-16  8:25 [Bug c/60858] New: 64-bit multi-character constants swissp2013 at gmail dot com
2014-04-16  8:32 ` [Bug c/60858] " pinskia at gcc dot gnu.org
2014-07-25 19:20 ` [Bug preprocessor/60858] " 3dw4rd at verizon dot net

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