OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [uninit-3.c] - Rev 823

Go to most recent revision | Compare with Previous | Blame | View Log

/* Spurious uninit variable warnings, case 3.
   Inspired by cppexp.c (parse_charconst) */
/* { dg-do compile } */
/* { dg-options "-O -Wuninitialized" } */
 
extern void error (char *);
 
int
parse_charconst (const char *start, const char *end)
{
  int c; /* { dg-bogus "c" "uninitialized variable warning" } */
  int nchars, retval;
 
  nchars = 0;
  retval = 0;
  while (start < end)
    {
      c = *start++;
      if (c == '\'')
	break;
      nchars++;
      retval += c;
      retval <<= 8;
    }
 
  if (nchars == 0)
    return 0;
 
  if (c != '\'')
    error ("malformed character constant");
 
  return retval;
}
 

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.