aboutsummaryrefslogtreecommitdiff
path: root/gcc/dwarf2codeview.cc
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2024-07-31 17:33:55 -0400
committerMarek Polacek <polacek@redhat.com>2024-08-05 12:17:02 -0400
commit34d947134403e7482ba4f153d8faabee0bc4933e (patch)
tree088a5357017e8d99f05f922004138dff7605249e /gcc/dwarf2codeview.cc
parentc26534d21159dd4c5d1472f0050b65e148161691 (diff)
downloadgcc-34d947134403e7482ba4f153d8faabee0bc4933e.zip
gcc-34d947134403e7482ba4f153d8faabee0bc4933e.tar.gz
gcc-34d947134403e7482ba4f153d8faabee0bc4933e.tar.bz2
c++: fix -Wdangling-reference false positive [PR115987]
This fixes another false positive. When a function is taking a temporary of scalar type that couldn't be bound to the return type of the function, don't warn, such a program would be ill-formed. Thanks to Jonathan for reporting the problem. PR c++/115987 gcc/cp/ChangeLog: * call.cc (do_warn_dangling_reference): Don't consider a temporary with a scalar type that cannot bind to the return type. gcc/testsuite/ChangeLog: * g++.dg/ext/attr-no-dangling6.C: Adjust. * g++.dg/ext/attr-no-dangling7.C: Likewise. * g++.dg/warn/Wdangling-reference22.C: New test.
Diffstat (limited to 'gcc/dwarf2codeview.cc')
0 files changed, 0 insertions, 0 deletions