https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119179

--- Comment #4 from TC <rs2740 at gmail dot com> ---
(In reply to Jonathan Wakely from comment #3)
> (In reply to Giuseppe D'Angelo from comment #2)
> > By the way: while reducing this example, I've noted that if one uses `VLA()
> > {}`, then the byte-filling gets disabled. Is it intended? It's not exactly
> > discussed
> > https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ftrivial-auto-
> > var-init , and I guess could be an acceptable workaround.
> 
> Since that makes the class non-trivially-default-constructible, I think it
> matches the expectation that the option only affects *trivial* automatic
> variables.

For that class, the default constructor is never trivial anyway because of the
DMIs. But I'm not seeing the reported effect on current godbolt?
  • [Bug c++/119179] Allow the [[gn... rs2740 at gmail dot com via Gcc-bugs

Reply via email to