This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

__attribute__ ((regparm(...))) in function declaration and gcc3.4.0


Why this fails to compile with gcc 3.4.0 (i686-pc-linux-gnu, 20030229)?

$ cat > test.h
int plus (int a, int b)  __attribute__ ((regparm (2)));
$ cat > test.c
#include "test.h"

int plus (int a, int b)
{
	return a + b;
}
$ gcc -c test.c
test.c:4: error: conflicting types for 'plus'
test.h:1: error: previous declaration of 'plus' was here
test.c:4: error: conflicting types for 'plus'
test.h:1: error: previous declaration of 'plus' was here
$ gcc-3.3 -c test.c
$

-- 
Best regards,                                                           Serge.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]