This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
- From: "joseph at codesourcery dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Dec 2004 17:41:36 -0000
- Subject: [Bug c/18963] [4.0 Regression] static and nested declarations cause an ice
- References: <20041213184413.18963.phython@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From joseph at codesourcery dot com 2004-12-15 17:41 -------
Subject: Re: New: static and nested declarations cause an ice
On Mon, 13 Dec 2004, phython at gcc dot gnu dot org wrote:
> The following testcase ices with mainline.
> static int barf ();
>
> int foo () {
> int j = 4;
> auto int barf ();
>
> int barf () {
> return j;
> }
>
> return barf ();
> }
>
> static int barf () {
> return 3;
> }
>
> What should the result be anyway?
4 (within the scope where the nested function is declared, it should
shadow the static function).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18963