Re: So what Standard are we working off?



Joe Wright <joewwright@xxxxxxxxxxx> writes:
[...]
Is there a case where a correct C90 program cannot be successfully
compiled by a C99 compiler? Actually this is not a compiler question
but a language one. Is there anything in C90 that C99 must reject or
handle differently?

Certainly.

#include <stdio.h>
main(void) /* C99 removes implicit int */
{
int restrict = 5; /* restrict and inline are new keywords */
int inline = 10 //*
/* subtle effect of "//" comments */
restrict;
printf("inline = %d\n", inline);
return; /* C99 requires return <expr> for a non-void function */
}

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
.



Relevant Pages

  • Re: problem with free.
    ... > int main ... You mix statements and declarations in your main program. ... using a C99 compiler, but it's more likely you're using a C++ compiler ...
    (comp.lang.c)
  • Re: Seg faults in merge and quick sort
    ... -The number of elements in an array definition ... unless using a C99 compiler. ... some nonstandard feature of your compiler. ... with type 'size_t', not 'int'. ...
    (comp.lang.c)
  • Compiling with another compiler than gcc.
    ... I have setup a mailing list about pcc, ... After having that project on the shelf for a year or so, I decided to make the compiler ... It is also quite simple to port, writing the basics for i386 took three hours ... I have added most of the C99 stuff (it is supposed to be a c99 compiler) but some stuff ...
    (freebsd-current)
  • Re: So what Standard are we working off?
    ... compiled by a C99 compiler? ... Is there anything in C90 that C99 must reject or handle ... dropping of implicit int, ...
    (comp.lang.c)
  • Re: Bootstraping compilers ?
    ... For this reason many Gcc compilers may not be able to ... (Assuming host and target are the same). ... However once you have written a C99 compiler you can then ...
    (comp.compilers)