https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #10 from Andrew Pinski ---
(In reply to Jonathan Wakely from comment #6)
> The problem is that ctx._M_indent is a member access expression through a
> reference, which is not allowed in constant expressions. This is a silly
> restric
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
Jonathan Wakely changed:
What|Removed |Added
Target Milestone|--- |12.0
Resolution|---
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #8 from CVS Commits ---
The master branch has been updated by Jonathan Wakely :
https://gcc.gnu.org/g:6c25932ac399423b09b730fb8f894ada568deb2a
commit r12-2933-g6c25932ac399423b09b730fb8f894ada568deb2a
Author: Jonathan Wakely
Date:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #7 from cqwrteur ---
(In reply to Jakub Jelinek from comment #5)
> Do we need to work around clang bugs here though? In headers I can
> understand it, but this is in the libstdc++.{so,a} only code.
well i love gcc, however, unfortu
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
Jonathan Wakely changed:
What|Removed |Added
Last reconfirmed||2021-08-16
Assignee|unassig
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #5 from Jakub Jelinek ---
Do we need to work around clang bugs here though? In headers I can understand
it, but this is in the libstdc++.{so,a} only code.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #4 from Jonathan Wakely ---
Clang accepts this:
struct S {
enum { _M_indent = 4 };
};
int f(S s)
{
const char str[s._M_indent + 1] = "";
return sizeof(str);
}
But rejects the same program with a reference parameter:
str
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #3 from Jonathan Wakely ---
It's not a VLA though, _M_indent is an enumerator with the value 4, and
ctx._M_index + 1 is 5.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org
--- Comment #2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101937
--- Comment #1 from Richard Biener ---
but it's 'const' so it must be initialized?
10 matches
Mail list logo