Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Reason for segmentation violation Date: Fri, 12 Jun 2015 08:35:39 -0700 Organization: None to speak of Lines: 34 Message-ID: <87mw05gcs4.fsf@kst-u.example.com> References: <869bae8d-e318-4e1c-865b-3c5890304279@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="31974"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19g9JNAP++0lhG4496ONR83" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:kFEMDxPsbD92C99Squ4Rsed1J7U= sha1:fAh6NC/ydT0syZd3bE8eZyAMXLI= Xref: csiph.com comp.lang.c:63216 Richard Heathfield writes: > On 12/06/15 10:36, Morten W. Petersen wrote: [...] >> OK. So then the logical thing to do is to develop based on the >> features available in the C90, and avoid features that work >> differently in C99 and C11, both in terms of how they work and if >> they are removed/deprecated. >> >> Is there a document somewhere which covers developing in this way? > > Not as far as I'm aware (although perhaps there should be), but you > can construct one reasonably easily by starting off with C90 (there > are, at the very least, copies of the draft of that Standard kicking > around the Net), and then crossing out in red pen anything that was > removed or deprecated in later standards. Off the top of my head, that > would be: > > * implicit int (removed in C99) > * gets (deprecated in C99 and removed by C11) > > ...and, er, I can't think of anything else (have I missed anything, folks?). I would also avoid old-style (non-prototype) function declarations and definitions. They're officially "obsolescent" in C90, C99, and C11, but they've never been removed from the language. Nevertheless, they should be avoided. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"