aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2024-12-06 11:00:52 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2024-12-06 11:00:52 +0100
commitecfc0e07377346c6307556496db882f4dcfb2846 (patch)
tree99d502275be360882a398a94722abe70416306a9 /gcc/config.gcc
parente65b09d461d2a4f37fb55d6dcd2e94b1f444daea (diff)
downloadgcc-ecfc0e07377346c6307556496db882f4dcfb2846.zip
gcc-ecfc0e07377346c6307556496db882f4dcfb2846.tar.gz
gcc-ecfc0e07377346c6307556496db882f4dcfb2846.tar.bz2
Use new RAW_DATA_{U,S}CHAR_ELT macros in the middle-end and C FE
During the patch review of the C++ #embed optimization, Jason asked for a macro for the common ((const unsigned char *) RAW_DATA_POINTER (value))[i] and ditto with signed char patterns which appear in a lot of places. In the just committed patch I've added +#define RAW_DATA_UCHAR_ELT(NODE, I) \ + (((const unsigned char *) RAW_DATA_POINTER (NODE))[I]) +#define RAW_DATA_SCHAR_ELT(NODE, I) \ + (((const signed char *) RAW_DATA_POINTER (NODE))[I]) macros for that in tree.h. The following patch is just a cleanup to use those macros where appropriate. 2024-12-06 Jakub Jelinek <jakub@redhat.com> gcc/ * gimplify.cc (gimplify_init_ctor_eval): Use RAW_DATA_UCHAR_ELT macro. * gimple-fold.cc (fold_array_ctor_reference): Likewise. * tree-pretty-print.cc (dump_generic_node): Use RAW_DATA_UCHAR_ELT and RAW_DATA_SCHAR_ELT macros. * fold-const.cc (fold): Use RAW_DATA_UCHAR_ELT macro. gcc/c/ * c-parser.cc (c_parser_get_builtin_args, c_parser_expression, c_parser_expr_list): Use RAW_DATA_UCHAR_ELT macro. * c-typeck.cc (digest_init): Use RAW_DATA_UCHAR_ELT and RAW_DATA_SCHAR_ELT macros. (add_pending_init, maybe_split_raw_data): Use RAW_DATA_UCHAR_ELT macro.
Diffstat (limited to 'gcc/config.gcc')
0 files changed, 0 insertions, 0 deletions