Il 28/04/2010 18:15, Daniel Dunbar ha scritto:
> Hi Eli,
> 
> I am about to revert this, it breaks a lot of project builds. I don't
> have a test case handy, but they all seem to involve noreturn. This is
> the ClamAV failure, for example:
> --
> clamdtop.c:435:24: error: conflicting types for 'exit_program'
> static void __noreturn exit_program(enum exit_reason reason, const
> char *func, unsigned line)
>                        ^
> clamdtop.c:113:13: note: previous declaration is here
> static void exit_program(enum exit_reason reason, const char *func,
> unsigned line);
>             ^

In added testcase:

__attribute((regparm(1))) int g(void);
__attribute((regparm(2))) int g(void);

we have conflicting attributes, while in

enum exit_reason;

#define __noreturn __attribute__((noreturn))
static void exit_program(enum exit_reason reason, const char *func,
                         unsigned line);
static void __noreturn exit_program(enum exit_reason reason, const
                                    char *func, unsigned line)

we should merge the attributes of the two function declarations.

That apart, the patch concerning type incompatibility is correct.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to