/* Minimal compiler test for C compiler.
*/

// Look at the return value with asking the shell (e. g. "echo $?" for bash)
// or a debugger and breakpoints at the returns. You can set a manual breakpoint with for(;;);


#include <stddef.h>


typedef struct
{
  unsigned char steps;
    union                     // unnamed union at end of struct for padding, see standard
  {
    unsigned char value;
    unsigned char meter;
    unsigned char percent;
  };
}
T_foo;


struct s {  // example from the standard chapter 6.7.2.1
    int n;
    double d[];
};


struct ss {  // example from the standard chapter 6.7.2.1
    int n;
    double d[1];
};


int 
main (void)
{
    if ( ( (sizeof (struct s)) == (offsetof (struct s, d)) ) &&
         ( (sizeof (struct s)) == (offsetof (struct ss, d)) ) )
      return 0;
    else
	return 1; // ERROR !!! Look at the return value e. g. with a debugger.
}
