// This a summary test file from compiler_tests0.
// 
// In this file are more than 10 semantic errors.
//

#include <stddef.h>
#include <string.h>

typedef struct
{
  unsigned char steps;
  union				// legal 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];
};

void
func(void)
{};


/* hidden error at file end: \ before the last line (ANSI-C 5.1.1.2); */
/* this should produce "warning: backslash-newline at end of file" */
main (void)			// warning: return type defaults to int
{
  static union u0
  {
    int i[2];
    short s[1];
    char c[1];
  } u00 =
  {{0}};				/* warning: braces around scalar initializer,  warning: unused variable */
  int a, b, c, d, i;
  volatile unsigned char uc_1;
  int arr[1234567890] = { 0 };	// error: size of array a is too large
  char e[10] = { 0 };
  char *f = &e[0];
  int r, (*fp) ();
  char *p1;
  int o[10];
  const char **p2 = &p1;	// warning: initialization from incompatible pointer type, see C-FAQs

  fp = func;			// functions are called via pointers
  r = (*fp) ();			// real functions decac implicitly into pointers in expressions, correct
  memmove (f, ++f, 9);		// warning: operation on f may be undefined
  i = ++i;			// warning: undefined operation
  a ^= b ^= a ^= b;		// warning: operation on a may be undefined
  a == b;			// warning: statement with no effect
  a = 0;
  b = 1;
  c = 2;
  d = 3;
  a = b << c + d;		// warning: suggest parentheses around + or - inside shift
  for (uc_1 = 0; uc_1 < 256; uc_1++);	// warning: comparison is always true due to limited range of data type
  if (o[0] > 256)		//warning: comparison is always false due to limited range of data type
    e[9]++;
  if (((sizeof (struct s)) == (offsetof (struct s, d))) &&
      ((sizeof (struct s)) == (offsetof (struct ss, d))))
     ;
  else
    return 1;			// ERROR !!! Look at the return value e. g. with a debugger.
  return ((int) 9[e]);	// e[9]=9[e] in ANSI-C: http://www.eskimo.com/~scs/C-faq/q6.11.html
}\
