X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.67.5.7 with SMTP id ci7mr2986331pad.45.1372314582705; Wed, 26 Jun 2013 23:29:42 -0700 (PDT) X-Received: by 10.50.4.99 with SMTP id j3mr1215851igj.6.1372314582539; Wed, 26 Jun 2013 23:29:42 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Wed, 26 Jun 2013 23:29:42 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse AT google DOT com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=71.222.72.40; posting-account=jrLHRgkAAABPV01ZW_RN_U6Tm5UnYNUx NNTP-Posting-Host: 71.222.72.40 References: <36e857f0-9899-496b-9fc6-32251e109888 AT googlegroups DOT com> <858cbded-7989-46e6-a997-93f842cdb3b0 AT googlegroups DOT com> <020e0244-406c-4c1f-9dbc-d82a0fae976f AT googlegroups DOT com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <7efccfc3-a8f0-4f91-84ff-f0d0fac82756@googlegroups.com> Subject: Re: General Protection Fault error is intermittent From: "K.J.Williams" Injection-Date: Thu, 27 Jun 2013 06:29:42 +0000 Content-Type: text/plain; charset=ISO-8859-1 Bytes: 3219 Lines: 55 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wednesday, June 26, 2013 7:24:34 AM UTC-7, rug DOT DOT DOT AT gmail DOT com wrote: > Hi, > > > > On Tuesday, June 25, 2013 6:26:59 PM UTC-5, K.J.Williams wrote: > > > > > > Well I have noticed this in some .h files (which I can read in > > > RHIDE), they sometimes #include other .h(s) before the defintions. > > > I thought , maybe string.h or stdio.h has a ctype.h included which > > > is allowing me to get away from actually using #include > > > in my code that I was needing isspace(); for. But I immediately > > > added that #include to my source code to prevent future problems > > > > You mentioned C99 explicitly, so you must be targeting that. I'm > > far from standards expert, but C89 (aka, ANSI C) only had 15 > > headers, and they were all standalone. (Doesn't mean they didn't > > include system dependent stuff behind the scenes, but the 15 > > weren't mixed amongst themselves.) > > > > C99 changed that, as I recently found out on djgpp-workers. > > Apparently some are mixed these days, e.g. inttypes.h apparently > > includes stdint.h. But you can't always count on such things > > for other headers, so it's best to be explicit in always including > > headers for functions you use. > > > > http://stackoverflow.com/questions/2027991/list-of-standard-header-files-in-c-and-c > > > > BTW, my recommendation (for you) is to use "-Wall -Wextra -Wpedantic -std=c99" > > with latest GCC 4.8.1, though I doubt that will automatically avoid all possible errors. But hey, it's better than nothing. Ok thanks... btw I am using GCC 4.7.3, the previous edition for building console programs.