aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile-resolve-path.cc
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-05-11 08:34:05 +0000
committerGitHub <noreply@github.com>2022-05-11 08:34:05 +0000
commitf2aee09a0b72eec4732cc2e3324bf62729539f88 (patch)
treef836b3d44d860aa64049dda2493ca47c21232e94 /gcc/rust/backend/rust-compile-resolve-path.cc
parentc1ff79996acfba45a50f181f9d3be1625cdef8f6 (diff)
parentd2dcac6a0bfe6a1ae66b584d231b74bd38fe48fc (diff)
parent2e65c14bef940fa2f7dff4f407178af21488b76e (diff)
downloadgcc-f2aee09a0b72eec4732cc2e3324bf62729539f88.zip
gcc-f2aee09a0b72eec4732cc2e3324bf62729539f88.tar.gz
gcc-f2aee09a0b72eec4732cc2e3324bf62729539f88.tar.bz2
Merge #1240 #1243
1240: Change Artihmetic Operation to be a cast type operation r=philberty a=philberty Arithmetic operations like this need a cast to support the range of integer types which are allow here. Fixes #1234 1243: Allow cast of integers to pointers r=philberty a=philberty This adds the cast rules of integer types and integer inference variables to pointers. The code-generation needed to remove the bad assertion that all integer literals were always going to be of type integer. This also needed a tweak to a bad port from the cp/constexpr.cc code which assumed that all integer_cst of pointer types would be a zero pointer which was used to detect cases of bad method pointers in CPP which we does not apply here. see gcc/cp/constexpr.cc:6564-6488 Fixes #1226 Co-authored-by: Philip Herron <philip.herron@embecosm.com>