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 Rugxulo(R) Homepage, Usono, 06.09.2015, 02:32

> 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).

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

 

Complete thread:

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