[arm] Make arm_cmse.h C99 compatible

gcc/ChangeLog
2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
	__typeof__.
	(cmse_check_pointed_object): Likewise.

gcc/testsuite/ChangeLog
2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>

	* gcc.target/arm/cmse/cmse-1c99.c: New test.

From-SVN: r261204
This commit is contained in:
Andre Vieira 2018-06-05 15:07:09 +00:00 committed by Andre Vieira
parent ab44754ea2
commit 9063f9ed9c
4 changed files with 16 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
* config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
__typeof__.
(cmse_check_pointed_object): Likewise.
2018-06-05 Martin Liska <mliska@suse.cz>
PR gcov-profile/47618

View file

@ -173,7 +173,7 @@ cmse_nonsecure_caller (void)
#define CMSE_MPU_NONSECURE 16
#define CMSE_NONSECURE 18
#define cmse_nsfptr_create(p) ((typeof ((p))) ((__INTPTR_TYPE__) (p) & ~1))
#define cmse_nsfptr_create(p) ((__typeof__ ((p))) ((__INTPTR_TYPE__) (p) & ~1))
#define cmse_is_nsfptr(p) (!((__INTPTR_TYPE__) (p) & 1))
@ -187,7 +187,7 @@ __extension__ void *
cmse_check_address_range (void *, size_t, int);
#define cmse_check_pointed_object(p, f) \
((typeof ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f)))
((__typeof__ ((p))) cmse_check_address_range ((p), sizeof (*(p)), (f)))
#endif /* __ARM_FEATURE_CMSE & 1 */

View file

@ -1,3 +1,7 @@
2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
* gcc.target/arm/cmse/cmse-1c99.c: New test.
2018-06-05 Cesar Philippidis <cesar@codesourcery.com>
PR fortran/85701

View file

@ -0,0 +1,4 @@
/* { dg-do compile } */
/* { dg-options "-Os -mcmse -std=c99" } */
/* This is a copy of cmse-1.c to test arm_mve.h ISO C compatibility. */
#include "cmse-1.c"