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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
It's likely an invalid code:

$ clang pr92428.c
pr92428.c:4:5: error: conflicting types for 'foo'
Foo foo(void){ return 0; }
    ^
pr92428.c:3:10: note: previous declaration is here
enum Foo foo(void);
         ^
1 error generated.

ICC says:

<source>(1): warning #102: forward declaration of enum type is nonstandard

  enum Foo;

       ^



<source>(2): error: invalid redeclaration of type name "Foo" (declared at line
1)

  typedef unsigned Foo;

                   ^



<source>(4): error: cannot overload functions distinguished by return type
alone

  Foo foo(void){ return 0; }

      ^



compilation aborted for <source> (code 2)

Compiler returned: 2

Reply via email to