help - old c compiler

Jindrich Nemec jindrich.nemec na skodanet.cz
Čtvrtek Říjen 29 16:34:49 CET 1998


Miloslav Trmac wrote:

> Zdenek Pizl, Czech Agriculture University, Prague wrote:
> >
> > hi,
> >
> >  mam maly hloupy dotaz :
> >
> >   mam na unix na HP a potrebuju prevzit parametry z command line,
> >  normalni smrtelnici pouziji int main(inbt argc, char **argv), ale ja tam
>                                         ^^^^ to tam opravdu mate ?
> > mam VELMI stary prekladac, ktery tohle nebere.
> Znamena velmi stary prekladac pre-ANSI? V tom pripde to zkuste takto:
> int main(argc, argv)
>         int argc;
>         char **argv;
> {
> ...
> }
>         Mirek

On cc na HP obcas potrebuje postrcit, aby kompiloval standardni ANSI C syntax.


man cc
...cut....
Options
      The following option is recognized only by cc:

      -Amode         Specify the compilation standard to be used by the
                     compiler.  mode can be one of the following letters:

                        c    (Default) Compile in a mode compatible with
                             HP-UX releases prior to 7.0.  (See The C
                             Programming Language, First Edition by
                             Kernighan and Ritchie).  This option also
                             defines the symbol _HPUX_SOURCE and allows the
                             user to access macros and typedefs provided by
                             the HPUX Operating System. The default
                             compilation mode may change in future releases.

                        a    Compile under ANSI mode (ANSI programming
                             language C standard ISO 9899:1990).  When
                             compiling under ANSI mode, the header files
                             would define only those names (macros and
                             typedefs) specified by the Standard. To access

bye




Další informace o konferenci Linux