[cfe-commits] r102464 - in /cfe/trunk: lib/AST/ASTContext.cpp test/Sema/attr-regparm.c
Abramo Bagnara
abramo.bagnara at gmail.com
Wed Apr 28 09:45:05 PDT 2010
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.
More information about the cfe-commits
mailing list