|
From: <sv...@va...> - 2015-03-12 22:47:05
|
Author: philippe
Date: Thu Mar 12 22:46:58 2015
New Revision: 15006
Log:
Fix non portability spotted by Florian:
An array must have at least 1 element.
0 element is accepted by gcc but is not portable.
Modified:
trunk/coregrind/m_aspacemgr/aspacemgr-common.c
Modified: trunk/coregrind/m_aspacemgr/aspacemgr-common.c
==============================================================================
--- trunk/coregrind/m_aspacemgr/aspacemgr-common.c (original)
+++ trunk/coregrind/m_aspacemgr/aspacemgr-common.c Thu Mar 12 22:46:58 2015
@@ -354,7 +354,9 @@
/*--- ---*/
/*-----------------------------------------------------------------*/
struct _VgStack {
- HChar bytes[0];
+ HChar bytes[1];
+ // We use a fake size of 1. A bigger size is allocated
+ // by VG_(am_alloc_VgStack).
};
/* Allocate and initialise a VgStack (anonymous valgrind space).
|