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

--- Comment #3 from Martin Uecker <muecker at gwdg dot de> ---

It is a major usability issue for its intended use in macros if it then
sometimes breaks due to arbitrary constraints (which __auto_type does not have,
so do not seem to be essential).

Also with the new tag rules in C2X you could also write this without 'auto'
because one could redeclare the type:

void foo(void)
{
  struct foo { int x; } a = (struct foo { int x; }){ 0 };
}

Finally, this example also does not work:

int foo(void)
{
    auto x = ({ struct foo { int x; } a = { }; a.x; });
    // int x = ({ struct foo { int x; } a = { }; a.x; });
}

Again, regular use of ({ }) in macros would not work without problems with
'auto' and cause random problem.s

int foo(void)
{
    int x = FOO(0); // works
    auto y = FOO(0); // mit break when FOO uses ({ }) 
}

Reply via email to