Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jun 1999 14:03:07 -0700 (PDT)
From:      tsingle@sunland.gsfc.nasa."gov"
To:        freebsd-gnats-submit@freebsd.org
Subject:   ports/12249: egcs `-O2 -Wall' uninitialized variable bug
Message-ID:  <19990616210307.C745814EDE@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         12249
>Category:       ports
>Synopsis:       egcs `-O2 -Wall' uninitialized variable bug
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 16 14:10:00 PDT 1999
>Closed-Date:
>Last-Modified:
>Originator:     Tim Singletary
>Release:        3.2-Release
>Organization:
NASA GSFC
>Environment:
FreeBSD talon.gsfc.nasa.gov 3.2-RELEASE FreeBSD 3.2-RELEASE #0: Tue May 18 04:05:08 GMT 1999     jkh@cathair:/usr/src/sys/compile/GENERIC  i386
>Description:
/* Demonstrates bug in egcs-2.91.66 on FreeBSD 3.2.  To see the bug,
   compile using:
  
          gcc -c token.c -g -Wall -O2 

   The bug is the warning:

     token.c:17: warning: `c' might be used uninitialized in this function

   egcs-2.91.60 on Solaris 2.6 reports this message twice.
*/


extern int getch();
extern int class();

int
token()
{
    int state = 1;

    while (1) {
	int c=0;
	c = getch();
	switch (state) {
	case 1: break;
	case 4: break;
	case 5: break;
	case 6: 
            {
	        switch (class(c)) {
	        default: break;
	        }
	    } break;
	case 7:	break;
	}
    }
}

>How-To-Repeat:
See Full Description; compile the code there.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990616210307.C745814EDE>