Wstrict-prototypes

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Wstrict-prototypes

    Hi!

    Since switching to SES v3.12 I have started to encounter compiling error:

    C Source Code

    1. '-Wstrict-prototypes' is valid for C/ObjC but not for C++

    I have a project where I mix up C++ and C, so any extern "C" allocation declarations ending up with this compiler error.
    When following multiple threads about this, I have hit the suggestion that one should somehow disable this flag at the global compiler settings - source .

    I get the same error for -Wno-strict-prototypes.
    I am using gnu11 and gnu++1y compiler standards.

    Is there any workaround for this?

    Cheers!
  • Hi,

    To prevent this error you will need to remove the compiler warning option -Wstrict-prototypes instead of negating it with -Wnostrict-prototypes
    The option is most commonly set on sloution level or project level in your project in the option Additional C/C++ Compiler Options.

    Once you removed the option you can re-add it to the Additional C Compiler Only Options

    Best regards
    Johannes
    Please read the forum rules before posting.

    Keep in mind, this is *not* a support forum.
    Our engineers will try to answer your questions between their projects if possible but this can be delayed by longer periods of time.
    Should you be entitled to support you can contact us via our support system: segger.com/ticket/

    Or you can contact us via e-mail.