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

--- Comment #16 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #15)
> Can the bug be marked as resolved?

Not exactly with an empty struct we warn twice.
That is take:
struct MyClass{};
typedef struct MyClass MyClass;
MyClass Bar2( void ) __attribute__((warn_unused_result));
void Foo( void )
{
    Bar2(); // warns twice
}


But the following only warns once:
struct MyClass{int t;};
typedef struct MyClass MyClass;
MyClass Bar2( void ) __attribute__((warn_unused_result));
void Foo( void )
{
    Bar2();
}



The warning twice started with GCC 7.

Reply via email to