$OpenBSD: patch-language_modula3_m3compiler_m3cc_gcc_obstack_h,v 1.1 2010/05/12 07:38:49 espie Exp $
--- language/modula3/m3compiler/m3cc/gcc/obstack.h.orig	Wed May 12 08:48:25 2010
+++ language/modula3/m3compiler/m3cc/gcc/obstack.h	Wed May 12 08:52:01 2010
@@ -377,8 +377,10 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (void *) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (void *));				\
-   if (!__o->alloc_failed)						\
-     *((void **)__o->next_free)++ = ((void *)datum);			\
+   if (!__o->alloc_failed) {						\
+     *((void **)__o->next_free) = ((void *)datum);			\
+     __o->next_free += sizeof(void *);					\
+   }									\
    (void) 0; })
 
 #define obstack_int_grow(OBSTACK,datum)					\
@@ -386,8 +388,10 @@ __extension__								\
 ({ struct obstack *__o = (OBSTACK);					\
    if (__o->next_free + sizeof (int) > __o->chunk_limit)		\
      _obstack_newchunk (__o, sizeof (int));				\
-   if (!__o->alloc_failed)						\
-     *((int *)__o->next_free)++ = ((int)datum);				\
+   if (!__o->alloc_failed) {						\
+     *((int *)__o->next_free) = ((int)datum);				\
+     __o->next_free += sizeof(int);					\
+   }									\
    (void) 0; })
 
 #define obstack_ptr_grow_fast(h,aptr) (*((void **) (h)->next_free)++ = (void *)aptr)
