[Bug c/60858] New: 64-bit multi-character constants
swissp2013 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 16 08:25:00 GMT 2014
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.
More information about the Gcc-bugs
mailing list