[Bug c/37743] Bogus printf format warning with __builtin_bswap32.
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Wed Feb 19 06:50:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37743
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #10 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Joseph S. Myers from comment #4)
> Because my bug 448 patch isn't complete (doesn't give knowledge of the
> stdint.h types for all targets), it doesn't yet fix this issue; it defines
> c_uint32_type_node and c_uint64_type_node to be the normal C types used
> in stdint.h where those are known to GCC. Once GCC knows the stdint.h
> types on all targets, we can get rid of the special uint32_type_node
> and uint64_type_node, renaming c_uint32_type_node and c_uint64_type_node
> to those names, and then the built-in function will return a normal C type.
So, can't c_common_nodes_and_builtins at least for now just
if (UINT32_TYPE)
uint32_type_node = c_uint32_type_node =
TREE_TYPE (identifier_global_value (c_get_ident (UINT32_TYPE)));
, etc. (for all the c_*type_node which have middle-end counterparts that are
then used for the builtins)? That way, this would work at least on the targets
that define the relevant macros.
Or perhaps instead after all the c_*type_node assignments do:
if (c_uint32_type_node
&& TYPE_PRECISION (c_uint32_type_node) == TYPE_PRECISION
(uint32_type_node)
&& TYPE_UNSIGNED (c_uint32_type_node) == TYPE_PRECISION
(uint32_type_node))
uint32_type_node = c_uint32_type_node;
(but perhaps that is too much paranoia).
More information about the Gcc-bugs
mailing list