www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/05/27/23:28:41

Xref: news2.mv.net comp.os.msdos.djgpp:4283
From: Rikard Thunberg <thunberg AT algonet DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: printf("%s",0) - Segmentation fault
Date: Mon, 27 May 1996 12:45:10 +0200
Organization: Informia
Lines: 8
Message-ID: <31A987B6.F1@algonet.se>
NNTP-Posting-Host: aristotle.algonet.se
NNTP-Posting-User: b37bfb8671f5d77b393c87732e2a5b740
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The following line will produce a "Segmentation fault" -error on some platforms/compilers:
printf("%s",0);

However, some platforms/compilers will produce a string like "(Null)" or similar.

Is it possible to tell the compiler what to do in this situation?

/Rikard Thunberg, thunberg AT algonet DOT se

- Raw text -


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