You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/17 14:35:19 UTC

[GitHub] [incubator-nuttx] gustavonihei commented on pull request #5767: arch:lib_atomic: remove and fix gcc warning `declaration-mismatch`

gustavonihei commented on pull request #5767:
URL: https://github.com/apache/incubator-nuttx/pull/5767#issuecomment-1070969552


   > ```
   >  Error: machine/arch_atomic.c:37:8: error: conflicting types for built-in function '__atomic_store_1'; expected 'void(volatile void *, unsigned char,  int)' [-Werror=builtin-declaration-mismatch]
   >    37 |   void __atomic_store_ ## n (type *ptr,                   \
   >       |        ^~~~~~~~~~~~~~~
   > machine/arch_atomic.c:185:1: note: in expansion of macro 'STORE'
   >   185 | STORE(1, uint8_t)
   >       | ^~~~~
   > ```
   > 
   > Seems like GCC is expecting `void __atomic_store_n (void *ptr, type val, int memorder)` despite documentation states `void __atomic_store_n (type *ptr, type val, int memorder);`.
   
   It seems that the newer GCC versions have changed the prototype.
   I've just tested `esp32c3-devkit:nsh` with `riscv64-unknown-elf-gcc` version **10.2** and it also reported the same warning.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org