This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to fix conflicting types for built-in function __atomic_* warnings
- From: Patrick Oppenlander <pattyo dot lists at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Tue, 14 Feb 2017 14:31:05 +1100
- Subject: How to fix conflicting types for built-in function __atomic_* warnings
- Authentication-results: sourceware.org; auth=none
- Dkim-filter: OpenDKIM Filter v2.10.3 camber.motec.com.au 1E44716BE5F
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