Bug 53995 - [4.7/4.8 Regression] Overload resolution fails with enum argument, says <anonymous enum>
Summary: [4.7/4.8 Regression] Overload resolution fails with enum argument, says <anon...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.7.2
: P1 normal
Target Milestone: 4.7.2
Assignee: Not yet assigned to anyone
URL:
Keywords: rejects-valid
Depends on:
Blocks: 51214
  Show dependency treegraph
 
Reported: 2012-07-17 11:53 UTC by Richard Biener
Modified: 2012-07-18 02:49 UTC (History)
2 users (show)

See Also:
Host:
Target: x86_64-*-*
Build:
Known to work: 4.7.1
Known to fail: 4.7.2
Last reconfirmed:


Attachments
testcase (380.68 KB, application/octet-stream)
2012-07-17 11:53 UTC, Richard Biener
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Biener 2012-07-17 11:53:37 UTC
Created attachment 27812 [details]
testcase

wt fails to build on the GCC 4.7 branch now with

 /usr/lib64/gcc/x86_64-suse-linux/4.7/cc1plus -fpreprocessed WChart2DRenderer.ii -quiet -dumpbase WChart2DRenderer.C -mtune=generic -march=x86-64 -auxbase-strip CMakeFiles/wt.dir/Wt/Chart/WChart2DRenderer.o -g -g -O2 -O2 -Wall -version -fmessage-length=0 -fstack-protector -funwind-tables -fasynchronous-unwind-tables -fPIC -o WChart2DRenderer.s
GNU C++ (SUSE Linux) version 4.7.1 20120713 [gcc-4_7-branch revision 189457] (x86_64-suse-linux)
        compiled by GNU C version 4.7.1 20120713 [gcc-4_7-branch revision 189457], GMP version 5.0.5, MPFR version 3.1.1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
GNU C++ (SUSE Linux) version 4.7.1 20120713 [gcc-4_7-branch revision 189457] (x86_64-suse-linux)
        compiled by GNU C version 4.7.1 20120713 [gcc-4_7-branch revision 189457], GMP version 5.0.5, MPFR version 3.1.1, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: 90ee474bd1a40375316ad24ac9499226
/home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WChart2DRenderer.C: In member function 'virtual void Wt::Chart::WChart2DRenderer::renderLegend()':
/home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WChart2DRenderer.C:1395:34: error: no matching function for call to 'Wt::Chart::WCartesianChart::plotAreaPadding(Wt::Chart::WChart2DRenderer::renderAxis(const Wt::Chart::WAxis&, Wt::WFlags<Wt::Chart::WChart2DRenderer::AxisProperty>)::<anonymous enum>)'
/home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WChart2DRenderer.C:1395:34: note: candidate is:
In file included from /home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WCartesianChart:10:0,
                 from /home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WChart2DRenderer.C:10:
/home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WAbstractChart:129:7: note: int Wt::Chart::WAbstractChart::plotAreaPadding(Wt::Side) const
/home/abuild/rpmbuild/BUILD/wt-3.2.0/src/Wt/Chart/WAbstractChart:129:7: note:   no known conversion for argument 1 from 'Wt::Chart::WChart2DRenderer::renderAxis(const Wt::Chart::WAxis&, Wt::WFlags<Wt::Chart::WChart2DRenderer::AxisProperty>)::<anonymous enum>' to 'Wt::Side'
...
Comment 1 Richard Biener 2012-07-17 11:56:18 UTC
Revision 189021 is the cause.
Comment 2 Jason Merrill 2012-07-18 02:48:04 UTC
Author: jason
Date: Wed Jul 18 02:47:59 2012
New Revision: 189598

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189598
Log:
	PR c++/53995
	* decl.c (finish_enum_value_list): Only call
	insert_late_enum_def_into_classtype_sorted_fields in class scope.

Added:
    trunk/gcc/testsuite/g++.dg/parse/enum9.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog
Comment 3 Jason Merrill 2012-07-18 02:48:21 UTC
Author: jason
Date: Wed Jul 18 02:48:17 2012
New Revision: 189599

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=189599
Log:
	PR c++/53995
	* decl.c (finish_enum_value_list): Only call
	insert_late_enum_def_into_classtype_sorted_fields in class scope.

Added:
    branches/gcc-4_7-branch/gcc/testsuite/g++.dg/parse/enum9.C
Modified:
    branches/gcc-4_7-branch/gcc/cp/ChangeLog
    branches/gcc-4_7-branch/gcc/cp/decl.c
    branches/gcc-4_7-branch/gcc/testsuite/ChangeLog
Comment 4 Jason Merrill 2012-07-18 02:49:02 UTC
Fixed.