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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2019-02-14
                 CC|                            |jsm28 at gcc dot gnu.org,
                   |                            |marxin at gcc dot gnu.org,
                   |                            |mpolacek at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, FE should reject that similarly to:

$ of ‘bar’ was here
 void bar () { }
      ^~~
marxin@marxinbox:~/Programming/testcases> cat pr89340.c
__attribute__((weak))
void bar () { }
bar();

$ gcc pr89340.c
pr89340.c:3:1: warning: data definition has no type or storage class
 bar();
 ^~~
pr89340.c:3:1: warning: type defaults to ‘int’ in declaration of ‘bar’
[-Wimplicit-int]
pr89340.c:3:1: error: conflicting types for ‘bar’
pr89340.c:2:6: note: previous definition of ‘bar’ was here
 void bar () { }
      ^~~

Reply via email to