[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2021-06-25 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

Jonathan Wakely  changed:

   What|Removed |Added

 CC||bero at arklinux dot org

--- Comment #5 from Jonathan Wakely  ---
*** Bug 43933 has been marked as a duplicate of this bug. ***

[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2020-11-28 Thread redi at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

Jonathan Wakely  changed:

   What|Removed |Added

 CC||gcc at linkmauve dot fr

--- Comment #4 from Jonathan Wakely  ---
*** Bug 98044 has been marked as a duplicate of this bug. ***

[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2020-08-04 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

Patrick Palka  changed:

   What|Removed |Added

   Target Milestone|--- |11.0
 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #3 from Patrick Palka  ---
Thanks for the report.  This should be fixed for GCC 11.

[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2020-08-04 Thread cvs-commit at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

--- Comment #2 from CVS Commits  ---
The master branch has been updated by Patrick Palka :

https://gcc.gnu.org/g:843710c037c1396dcdbc23e5b6b456b8ae6e2b8b

commit r11-2546-g843710c037c1396dcdbc23e5b6b456b8ae6e2b8b
Author: Patrick Palka 
Date:   Tue Aug 4 10:11:35 2020 -0400

c++: Member initializer list diagnostic locations [PR94024]

This patch preserves the source locations of each node in a member
initializer list so that during processing of the list we can set
input_location appropriately for generally more accurate diagnostic
locations.  Since TREE_LIST nodes are tcc_exceptional, they can't have
source locations, so we instead store the location in a dummy
tcc_expression node within the TREE_TYPE of the list node.

gcc/cp/ChangeLog:

PR c++/94024
* init.c (sort_mem_initializers): Preserve TREE_TYPE of the
member initializer list node.
(emit_mem_initializers): Set input_location when performing each
member initialization.
* parser.c (cp_parser_mem_initializer): Attach the source
location of this initializer to a dummy EMPTY_CLASS_EXPR
within the TREE_TYPE of the list node.
* pt.c (tsubst_initializer_list): Preserve TREE_TYPE of the
member initializer list node.

gcc/testsuite/ChangeLog:

PR c++/94024
* g++.dg/diagnostic/mem-init1.C: New test.

[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2020-05-13 Thread ppalka at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

Patrick Palka  changed:

   What|Removed |Added

 CC||ppalka at gcc dot gnu.org
 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |ppalka at gcc dot 
gnu.org

[Bug c++/94024] Error message has misleading source location for constructor member initialisation.

2020-03-03 Thread mpolacek at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94024

Marek Polacek  changed:

   What|Removed |Added

   Keywords||diagnostic
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2020-03-03
 CC||mpolacek at gcc dot gnu.org
 Ever confirmed|0   |1

--- Comment #1 from Marek Polacek  ---
Confirmed with trunk.