https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93844
--- Comment #5 from Richard Biener ---
(In reply to Tom de Vries from comment #4)
> (In reply to Richard Biener from comment #1)
> > The only way to capture these may
> > be to introduce additional scoping in the FEs whenever new local decls
> >
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93844
--- Comment #4 from Tom de Vries ---
(In reply to Richard Biener from comment #1)
> The only way to capture these may
> be to introduce additional scoping in the FEs whenever new local decls
> are added. Also consider
>
> const char *oldst =
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93844
--- Comment #3 from Tom de Vries ---
(In reply to Richard Biener from comment #1)
> and there's a duplicate PR about this.
I found: PR92386 - "gdb issue with variable-shadowing" which sound similar.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93844
--- Comment #2 from Tom de Vries ---
(In reply to Richard Biener from comment #1)
> Guess it's the same bug as with C99 or C++ where you can write
>
> const char *st = "Shall we?";
> int main()
> {
> printf ("%s\n", st);
> printf ("%s\n",
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93844
--- Comment #1 from Richard Biener ---
Guess it's the same bug as with C99 or C++ where you can write
const char *st = "Shall we?";
int main()
{
printf ("%s\n", st);
printf ("%s\n", "Before assignment");
const char *st = "Hello, world!";