>>>>> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes:

Alexandre> On Nov 17, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
>> Because I believe the definition I gave of it implied it was two
>> chars wide.  But maybe I'm making wrong assumptions

Alexandre> You are.  Some ABIs specify minimum alignments for
Alexandre> arbitrary structs.

Alexandre> How about `typedef char charchar[2]'?

Thanks!  I'm applying this change:

2000-11-29  Akim Demaille  <[EMAIL PROTECTED]>

        sizeof (struct {char a,b; }) is not required to be 2.
        Reported by Johan Danielsson.

        * tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an
        array of 2 chars.
        Suggested by Alexandre.


Index: tests/semantics.at
===================================================================
RCS file: /cvs/autoconf/tests/semantics.at,v
retrieving revision 1.8
diff -u -u -r1.8 semantics.at
--- tests/semantics.at 2000/11/29 10:11:38 1.8
+++ tests/semantics.at 2000/11/29 14:12:38
@@ -101,27 +101,19 @@
 # AC_CHECK_SIZEOF
 # ---------------
 AT_CHECK_MACRO([AC_CHECK_SIZEOF],
-[AC_CHECK_SIZEOF(char)
+[[AC_CHECK_SIZEOF(char)
 AC_CHECK_SIZEOF(charchar,,
-[#include <stdio.h>
-typedef struct
-{
-  char a;
-  char b;
-} charchar;])
+[[#include <stdio.h>
+typedef char charchar[2];]])
 AC_CHECK_SIZEOF(charcharchar)
 
 # Exercize the code used when cross-compiling
 cross_compiling=yes
 AC_CHECK_SIZEOF(unsigned char)
 AC_CHECK_SIZEOF(ucharchar,,
-[#include <stdio.h>
-typedef struct
-{
-  unsigned char a;
-  unsigned char b;
-} ucharchar;])
-AC_CHECK_SIZEOF(ucharcharchar)],
+[[#include <stdio.h>
+typedef unsigned char ucharchar[2];]])
+AC_CHECK_SIZEOF(ucharcharchar)]],
 [AT_CHECK_DEFINES(
 [#define SIZEOF_CHAR 1
 #define SIZEOF_CHARCHAR 2


Johan, I think we have fixed all the troubles you faced.  Could you
check that the test suite now runs smoothly?  Thanks!

Reply via email to