[LLVMbugs] [Bug 581] NEW: Division by Zero - Not an "error"?

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Mon Jun 13 15:45:21 PDT 2005


http://llvm.cs.uiuc.edu/bugs/show_bug.cgi?id=581

           Summary: Division by Zero - Not an "error"?
           Product: tools
           Version: 1.5
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: bryan.turner at pobox.com


Hello,

This is more of a pedantic note than a bug, but it seems relevent.  A sequence
that the compiler correctly flagged as a division by zero (statically) was
output as a warning.  During execution the inevitable occured, causing a
Division By Zero exception.

Why is this reported as a warning instead of an error?  I would consider all
statically-proven divisions by zero to be an error.

/*
// --- RANDOMLY GENERATED PROGRAM ---
// Program Generator by Bryan Turner (bryan.turner at pobox.com)
*/

/* --- GLOBAL VARIABLES --- */
unsigned short g_20372824 = 0xBD3B;

/* ------------------------------------------ */
int func_94997433( int l_97400475, long l_48492707 )
{
	if ( ( ( l_48492707 > l_48492707 )  / ( g_20372824 > 0xB658C2CC )  )  )
	{
		return 0;
	}
}



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.




More information about the llvm-bugs mailing list