]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
sizeof (struct {char a,b; }) is not required to be 2.
authorAkim Demaille <akim@epita.fr>
Wed, 29 Nov 2000 14:14:10 +0000 (14:14 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 29 Nov 2000 14:14:10 +0000 (14:14 +0000)
Reported by Johan Danielsson.
* tests/semantics.at (AC_CHECK_SIZEOF): Define charchar as an
array of 2 chars.
Suggested by Alexandre.

ChangeLog
tests/semantics.at

index 2f391650e4a137206143d6f3ded4900d2b0be102..f7edff6d73fd0c878b354c62abb237fa57988efe 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-11-29  Akim Demaille  <akim@epita.fr>
+
+       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.
+
 2000-11-29  Akim Demaille  <akim@epita.fr>
 
        Provide a means to display banners in the test suite.
        (AT_INIT): After having checked whether the test failed, break out
        of the loop if requested (-e).
 
-       
+
 2000-11-23  Akim Demaille  <akim@epita.fr>
 
        * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's
        AT_CHECK's job.
        Remove the code depending upon `at_skip_mode': it's unused.
 
-       
+
 2000-11-23  Akim Demaille  <akim@epita.fr>
 
        * tests/atconfig.in: Remove the `snippet' marks, there are no
index 046c14f4060da8b76c05a76f08dff2dca7cf8ce2..09ebef2af837cf4a4e46e333ec65751b19f676dd 100644 (file)
@@ -101,27 +101,19 @@ AT_CHECK_MACRO([AC_CHECK_MEMBERS],
 # 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