delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1992/07/03/13:09:46

Date: Fri, 03 Jul 92 13:18:24 PRT
From: "Jose M. Cerqueira Esteves" <FESTEVES%PTEARN AT clvm DOT clarkson DOT edu>
Subject: Another bug with long longs
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Greetings


Another bug with long longs...

When the following program

======================= file tbug1.c ======================
#include <stdio.h>

long long int buggs = 123;

double trouble;
void
main()
{
  trouble = (double) (buggs & 0x7FFFFFFFFFFFFFFFLL);
  printf ("%f\n",trouble);
}
==========================================================

is compiled (using DJGPP 1.06) with

     gcc -o tbug1 tbug1.c

no errors are reported (and the resulting program runs OK).

But with

     gcc -O -o tbug1 tbug1.c

GCC crashes, saying     "Exception 117 at eip=a9cf1", and a
(random) character appears at the top screen line.


                                       Jos\'e Esteves

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019