gcc compiler options for K&R C code Options

Discussion in 'C Programming' started by Utkado, Dec 17, 2008.

  1. Utkado

    Utkado Guest

    Hi,

    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 ?


    Thanks
    Utkado
     
    Utkado, Dec 17, 2008
    #1
    1. Advertising

  2. Utkado <> 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) <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"
     
    Keith Thompson, Dec 17, 2008
    #2
    1. Advertising

  3. Utkado

    Guest

    On 17 déc, 06:27, Utkado <> wrote:
    > Hi,
    >
    > 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 ?
    >
    > Thanks
    > Utkado


    try with -traditional.
     
    , Dec 18, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    8
    Views:
    464
  2. lovecreatesbeauty

    What gcc options guarantee more portable C code

    lovecreatesbeauty, Jun 15, 2006, in forum: C Programming
    Replies:
    28
    Views:
    1,221
    Peter Nilsson
    Jun 17, 2006
  3. mahesh
    Replies:
    6
    Views:
    1,165
    benben
    Sep 27, 2006
  4. Dave
    Replies:
    16
    Views:
    607
  5. SG
    Replies:
    5
    Views:
    719
Loading...

Share This Page