www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/08/14/16:10:50

To: djgpp AT sun DOT soe DOT clarkson DOT edu
From: bertung AT gab DOT unt DOT edu (Bora Ertung )
Subject: BUG IN V2??
Date: Mon, 14 Aug 1995 19:55:09 GMT

main(int argc,char **argv)
{
 FILE *yyin;
 yyin=fopen(argv[1],"r");
 if(!yyin)exit(0);
}

Lets assume that our program' name is test. When we
just enter 
c:\>test
Abort!

wowww..It is not suppose to be a bug at all. Because it works fine with
gcc for unix. But, 'fopen' may return 'null' if 'filename' is 'null'
 instead of saying 'Abort!' because of the 'null' filename.
And of course it is pretty logical to catch null pointer assingments.
But, It was working with official version of the djgpp.May be I am just 
dreaming.

Bora

- Raw text -


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