aboutsummaryrefslogtreecommitdiff
path: root/gcc/dumpfile.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@codesourcery.com>2021-11-09 10:55:15 +0100
committerThomas Schwinge <thomas@codesourcery.com>2021-11-09 13:20:41 +0100
commitc71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb (patch)
tree827bd644fadfd007cd9e5010fc493375fef2b6ff /gcc/dumpfile.c
parent32ba7860ccaddd5219e6dae94a3d0653e124c9dd (diff)
downloadgcc-c71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb.zip
gcc-c71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb.tar.gz
gcc-c71cb26a9e841888f52e4bfcaad94c8f8ecb4fdb.tar.bz2
Get rid of infinite recursion for 'typedef' used with GTY-marked 'gcc/diagnostic-spec.h:nowarn_map' [PR101204, PR103157]
Reproduced with clang version 10.0.0-4ubuntu1: gtype-desc.c:11333:1: warning: all paths through this function will call itself [-Winfinite-recursion] ... as well as some GCC's '-O2 -fdump-tree-optimized': void gt_pch_nx(int_hash<unsigned int, 0u, 4294967295u>*, gt_pointer_operator, void*) ([...]) { <bb 2>: <bb 3>: goto <bb 3>; } That three-arguments 'gt_pch_nx' function as well as two one-argument 'gt_ggc_mx', 'gt_pch_nx' functions now turn empty: [...] void -gt_ggc_mx (int_hash<location_t,0,UINT_MAX>& x_r ATTRIBUTE_UNUSED) +gt_ggc_mx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED) { - int_hash<location_t,0,UINT_MAX> * ATTRIBUTE_UNUSED x = &x_r; - gt_ggc_mx (&((*x))); + struct xint_hash_t * ATTRIBUTE_UNUSED x = &x_r; } [...] void -gt_pch_nx (int_hash<location_t,0,UINT_MAX>& x_r ATTRIBUTE_UNUSED) +gt_pch_nx (struct xint_hash_t& x_r ATTRIBUTE_UNUSED) { - int_hash<location_t,0,UINT_MAX> * ATTRIBUTE_UNUSED x = &x_r; - gt_pch_nx (&((*x))); + struct xint_hash_t * ATTRIBUTE_UNUSED x = &x_r; } [...] void -gt_pch_nx (int_hash<location_t,0,UINT_MAX>* x ATTRIBUTE_UNUSED, +gt_pch_nx (struct xint_hash_t* x ATTRIBUTE_UNUSED, ATTRIBUTE_UNUSED gt_pointer_operator op, ATTRIBUTE_UNUSED void *cookie) { - gt_pch_nx (&((*x)), op, cookie); } [...] gcc/ PR middle-end/101204 PR other/103157 * diagnostic-spec.h (typedef xint_hash_t): Turn into... (struct xint_hash_t): ... this. * doc/gty.texi: Update.
Diffstat (limited to 'gcc/dumpfile.c')
0 files changed, 0 insertions, 0 deletions