gcc 3.2.x und C99/C89



  • hey,

    weiss vielleicht jemand wie man dden gcc 3.2.x dazu bringen kann, dass er
    rummeckert bzw. fehler wirft wenn man gewisse sachen macht, die C99 erlaubt,
    C89 aber nicht ?

    also konkret, dass er z.b. variablendeklarationen nur am funktionsheader erlaubt.

    mit '-std=c89' oder '-std=gnu89' gehts leider schonmal nicht.



  • hi

    ahnungslos wie ich bin... vielleicht hilft sowas?

    -std=c99' or-std=iso9899:1999'.

    ist aber auch nüscht anders...

    von hier:
    http://www.uni-regensburg.de/EDV/kurs_info/brf09510/kurs_info/c.phtml
    (legende unten)

    ps: war etwas verkehrt rum gedacht 😉

    so?

    __STDC_VERSION__ == 199409L -std=iso9899:199409' amendment to the 1990 standard was published in 1995-ansi', -std=c89' or-std=iso9899:1990' Technical Corrigenda published in 1996. GCC

    pps: und die manpage hast du sicher dazu...

    GNU CPP(1)

    used, and may cause surprising changes to the meaning of a
    program which does not expect them. To get strict ISO
    Standard C, you should use the -std=c89 or -std=c99 options,
    depending on which version of the standard you want. To get
    all the mandatory diagnostics, you must also use -pedantic.

    ppps: zuwerf mit links:

    . To select this standard in GCC, use one of the options -ansi, -std=c89 or -std=iso9899:1990; to obtain all the diagnostics required by the standard, you should also specify -pedantic (or -pedantic-errors if you want them to be errors rather than warnings). See Options Controlling C Dialect.

    http://visual-mingw.sourceforge.net/doc/gcc-3.2.3/Standards.html#Standards

    pppps: gruss


Anmelden zum Antworten