aboutsummaryrefslogtreecommitdiff
path: root/libcpp
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-05-06 23:38:13 +0200
committerJakub Jelinek <jakub@redhat.com>2020-05-06 23:38:13 +0200
commit46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87 (patch)
tree5291205eec644bb2bc340fe83f5e35273901eeb2 /libcpp
parent25ee2155ead87a5ea1c152a29341ee1e3275d706 (diff)
downloadgcc-46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87.zip
gcc-46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87.tar.gz
gcc-46fcef99f49cc2d9f28d98f8ecdbf8263e9e0a87.tar.bz2
c++: Avoid strict_aliasing_warning on dependent types or expressions [PR94951]
The following testcase gets a bogus warning during build_base_path, when cp_build_indirect_ref* calls strict_aliasing_warning with a dependent expression. IMHO calling get_alias_set etc. on dependent types feels wrong to me, we should just defer the warnings in those cases until instantiation and only handle the cases where neither type nor expr are dependent. 2020-05-06 Jakub Jelinek <jakub@redhat.com> PR c++/94951 * typeck.c (cp_strict_aliasing_warning): New function. (cp_build_indirect_ref_1, build_reinterpret_cast_1): Use it instead of strict_aliasing_warning. * g++.dg/warn/Wstrict-aliasing-bogus-tmpl.C: New test.
Diffstat (limited to 'libcpp')
0 files changed, 0 insertions, 0 deletions