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]

Re: ARM and __attribute__ long_call error


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.


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