This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/55535] Call to default constructor with overloaded subscript operator is interpreted as declaring/using array
- From: "niels at penneman dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 29 Nov 2012 21:07:07 +0000
- Subject: [Bug c++/55535] Call to default constructor with overloaded subscript operator is interpreted as declaring/using array
- Auto-submitted: auto-generated
- References: <bug-55535-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55535
--- Comment #1 from Niels Penneman <niels at penneman dot org> 2012-11-29 21:07:07 UTC ---
Wrong copy/paste for output. Below is the correct compiler output.
$ g++ -fsyntax-only -Wall -Wextra voodoo.cxx
voodoo.cxx: In function âvoid func()â:
voodoo.cxx:10:20: error: size of array has non-integral type âEmptyâ
(Voodoo()[Empty()]);
^
voodoo.cxx:10:20: error: âtype nameâ declared as function returning an array
voodoo.cxx:10:20: error: size of array has non-integral type âEmptyâ
voodoo.cxx:10:20: error: âtype nameâ declared as function returning an array