delorie.com/archives/browse.cgi | search |
From: | av568 AT rgfn DOT epcc DOT edu (Beautiful Savior Lutheran Church) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: DJGPP inconsistencies? |
Date: | 13 Mar 1997 04:20:33 GMT |
Organization: | The Rio Grande Free-Net, El Paso Community College, El Paso, TX |
Lines: | 36 |
Message-ID: | <5g7vah$be8@news.epcc.edu> |
References: | <5g7p5i$abl AT netra DOT montana DOT edu> |
NNTP-Posting-Host: | rgfn.epcc.edu |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Paul Peavyhouse (pv AT cs DOT montana DOT edu) wrote: > I have noticed a few inconsistencies with the DJGPP compiler over > other C compilers I use. > The first one is that the lines: > for(int i=0; i<256; i++) > { someFunction(i); > } > won't compile SOMETIMES (?!?!?!), yet the lines: > int i; > for (i=0; i<256; i++) > { someFunction(i); > } > works everytime...why? > Also, I sometimes get random compiler "parse" errors when I include > the following code in a program: > char *str; > if ( (str = getenv("DEM_PATH")) == NULL) { > printf("\"DEM_PATH\" environment variable not set\n"); > exit(1); > } > Yet again...WHY? These declarations occur inside of code. If you're not compiling in C++ mode (with the file extension .cc), gcc will correctly report these as errors. -- Beautiful Savior Evangelical Lutheran Church - av568 AT rgfn DOT epcc DOT edu We have what you need-- A Savior!
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |