Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Smaller C compiler (Announce)

posted by alexfru(R), USA, 06.09.2015, 07:05

> > Smaller C does not support all of the C language (that applies to the
> > library as well) and the compiler proper uses a fixed amount of memory
> to
> > keep track of declarations and symbols. It is unlikely that some random
> > stuff pulled in from, say, DJGPP include directories (by mistake or
> > intentionally) will do much good. So, the location of system headers is
> > overridden to prevent mixing and matching system headers, especially
> while
> > having these limitations.
> Okay, makes sense, I had forgotten about that possibility.
> > > Also, you should probably also use "-U__GNUC__" since some macros may
> > > depend on it. If you don't do this and use GCC as preprocessor,
> > > SmallerC will choke on faulty code.
> >
> > Maybe. Right now you can depend on __SMALLER_C__ for stuff that's
> intended
> > for Smaller C and when it's not defined do something else for gcc or
> > another compiler. Given the above limitations, you still pretty much
> have
> > to write specialized code for Smaller C, in which case checking first
> for
> > __SMALLER_C__ isn't that much different from checking for __GNUC__ and
> the
> > like.
> Well, I'm not sure why I ever (even optionally) used case ranges. It's
> trivial syntactic sugar, not very useful, the object code isn't any
> different/better, so I've removed it.
> However, my trivial code doesn't need additional checks, everything so far
> works fine (since you've implemented most stuff already).

I try not to use any compiler-specific extensions unless absolutely needed in the project.

> Anyways, FYI, I think
> -undef
> is more appropriate: "Do not predefine any system-specific or GCC-specific
> macros. The standard predefined macros remain defined."

I must've missed that option. I should've used it from the beginning. Thanks for mentioning it, I'll add it in one of the future versions.


Complete thread:

Back to the forum
Board view  Mix view
15276 Postings in 1373 Threads, 253 registered users, 14 users online (0 registered, 14 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum