X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f X-Received: by 10.224.129.196 with SMTP id p4mr1722274qas.6.1372202820327; Tue, 25 Jun 2013 16:27:00 -0700 (PDT) X-Received: by 10.50.73.69 with SMTP id j5mr871310igv.14.1372202820289; Tue, 25 Jun 2013 16:27:00 -0700 (PDT) Newsgroups: comp.os.msdos.djgpp Date: Tue, 25 Jun 2013 16:26:59 -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: Subject: Re: General Protection Fault error is intermittent From: "K.J.Williams" Injection-Date: Tue, 25 Jun 2013 23:27:00 +0000 Content-Type: text/plain; charset=ISO-8859-1 Bytes: 2980 Lines: 55 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r5PNj2KA015453 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 Tuesday, June 25, 2013 8:45:35 AM UTC-7, rug DOT DOT DOT AT gmail DOT com wrote: > Hi, > > > > On Tuesday, June 25, 2013 3:24:59 AM UTC-5, K.J.Williams wrote: > > > > > > BTW, I found another bug with DJGPP > > > > > > if you have program that just uses : > > > > > > #include > > > #include > > > > > > ...and you use a function from ctype.h - as I did with isspace(), > > > without including ctype.h in your includes ... DJGPP/GCC will NOT > > > complain about it and will still compile it. > > > > Originally, way way back, C didn't have a preprocessor at all. I > > think, without explicit prototypes, C assumes every function returns > > an int. C nowadays only has simple file inclusion, thus it's not true > > modules, hence instead of the compiler checking for consistency, it's > > left to the linker to resolve. But for varargs functions (e.g. printf) > > you always have to include the header for prototype as it's allowed > > to change the ABI. > 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