This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: ARM and __attribute__ long_call error
- From: Richard Earnshaw <rearnsha at gcc dot gnu dot org>
- To: Jani Monoses <jani at iv dot ro>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 07 Jun 2005 17:12:11 +0100
- Subject: Re: ARM and __attribute__ long_call error
- References: <d84d1d$uoe$1@sea.gmane.org>
On Tue, 2005-06-07 at 16:08, Jani Monoses wrote:
> Hello
>
> trying to compile the following simple source file using arm-elf-gcc 4.0
>
> void pig(void) __attribute__ ((long_call));
> void pig(void)
> {
> }
>
> yields:
>
> error: conflicting types for 'pig'
> error: previous declaration of 'pig' was here
>
Yes, that's the way it's currently coded.
The problem, it seems to me, is that we want to fault:
void pig(void) __attribute__ ((long_call));
...
void pig(void);
and
void pig(void);
...
void pig(void) __attribute__((long_call));
both of which would be potentially problematical (which do we believe?)
from the case that you have. AFAICT there is nothing on the types
passed into the back-end to distinguish a declaration from a definition
in this context.
> The same with gcc3.3. With other function attributes (isr, section, naked etc.) it works fine.
>
Looking at the code suggests isr should be strictly enforced too.
R.