Re: gcc compiler options for K&R C code Options



Utkado <utkado@xxxxxxxxx> writes:
Escuse me for posting this compiler specific query in this newsgroup.
I have already posted it in the gnu.gcc.help group but not received
any response hence posting this this query here in case someone can
provide the right information.

We are currently using a legacy application on solaris which contains
K&R style C code and needs to be migrated to linux platform.

My query is does gcc compiler support K&R C code ? If so what are
the
compiler options to be specifically provided for to gcc to compile
successfully ?

Much K&R code is still valid C90 or C99 code. For example, old-style
function declarations are still supported, and implicit int is still
valid in C90 (though not in C99). You might find that your code will
compile with the default settings.

gcc comes with extensive documentation. Try "info gcc" and search for
"K&R" ('s' to search, 'n' to find the next occurrence).

--
Keith Thompson (The_Other_Keith) kst-u@xxxxxxx <http://www.ghoti.net/~kst>
Nokia
"We must do something. This is something. Therefore, we must do this."
-- Antony Jay and Jonathan Lynn, "Yes Minister"
.



Relevant Pages

  • Re: Whats the story with the "end of XP"?
    ... Support gives them access to the larger body ... The same compiler suite may be "best" in both ... In the case of ByteCraft compilers, you are truly expert in your field, you work closely and rapidly with customers if there are any issues, and you have top class testing and quality control. ... understanding the inner workings of a relatively simple compiler like GCC ...
    (comp.arch.embedded)
  • [RFC][PATCH-2.6] Clean up and merge compiler-*.h
    ... the kernel headers in include/linux to include/linux-abi. ... * Common definitions for all gcc versions go here. ... -/* Some compiler specific definitions are overwritten here ...
    (Linux-Kernel)
  • Re: LPC900/80C51 Compiler Toolchain
    ... >> supported by GCC, and so they invest. ... > if they already have their in-house compiler. ... one of the main companies in the Symbian consortium ... vendor to provide a good compiler for Atmel AVRs and eventually became ...
    (comp.arch.embedded)
  • Lib X11 compile problem /Xlib.h:3573: error: syntax error before "_X_SENTINEL"
    ... checking for gcc... ... checking for C compiler default output file name... ... checking how to recognise dependent libraries... ...
    (comp.os.linux.x)
  • make error compiling sysbench for MySQL
    ... checking for gcc... ... checking for C compiler default output file name... ... checking libaio.h usability... ... checking libaio.h presence... ...
    (linux.redhat)