This is the mail archive of the gcc-help@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]

How to fix conflicting types for built-in function __atomic_* warnings


Hi,

I'm trying to implement some libatomic functions on an ARM Cortex M0 and can't seem to get the function signatures right.

I'm currently trying signatures that look like:

int8_t __atomic_exchange_1(int8_t *object, int8_t desired, memory_order)
{
	...
}

But GCC complains with:

/home/patrick/src/motec/ldm/lib/atomic.c:16:8: warning: conflicting types for built-in function '__atomic_exchange_1'
 int8_t __atomic_exchange_1(int8_t *object, int8_t desired, memory_order)
        ^~~~~~~~~~~~~~~~~~~

Specifying "-fno-builtin" makes no difference.

Is there any way to get around this? Or am I missing something obvious.

Many thanks,

		Patrick


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