Re: Automatically generate variables



santosh wrote:

But what about more fundamental extensions like the && gcc extension
discussed in another thread or the various operator overloading
features implemented by the lcc-win32 compiler? Can code that use such
"radical" extensions still be called as C? I don't think so. What
makes one extension reasonable and another not, from the POV of being
compatible with C?

One has to draw the distinction between extensions to the language (the
&& gcc extension and operator overloading) and platform specific
libraries. It is a fairly straightforward exercise for a developer to
implement a set of functions defined in a library (say Posix file
handling or BSD style sockets), but not to implement extensions to the
language. Which makes the former portable and the latter not.

Anything which conforms to the language defined in the current C
standard is a C program, which includes programs that include
non-standard headers.

--
Ian Collins.
.



Relevant Pages

  • Re: Making C better (by borrowing from C++)
    ... >>The C99 standard explicitly allows extensions, ... >>been designed keeping compatible with the C99 standard. ... > allow extensions to the language syntax. ... >>Operator overloading is a standard extension that is used in Fortran, ...
    (comp.lang.c)
  • Re: The lack of default function parameter in C99 makes compatibility difficult.
    ... This extensions make C a much more usable language, and they are compatible with the ... don't like their syntax for it, but it'd be extremely useful at times. ...
    (comp.lang.c)
  • Re: CERT C Secure Coding Standard - last call for reviewers
    ... Of course you are free to implement them with your extensions, ... If my compiler uses operator overloading to implement that, ... implement complex numbers with your operator overloading scheme. ... jacob at jacob point remcomp point fr ...
    (comp.lang.c)
  • Re: Porting C software
    ... The objective here is to enhance the C language, ... and transform it into C++. ... In other cases of operator overloading, I am compatible with C++, ... Note that I do not think that the extensions I propose transform ...
    (comp.lang.c)
  • Re: Multi precision floating point
    ... -ansic however, all extensions are disabled, including ... implementation of operator overloading conforms to the C standard, ... mode that supports operator overloading, is not bound by the C ...
    (comp.lang.c)