Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7171659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:27:30+00:00 2026-05-28T15:27:30+00:00

I am using a Wind River Compiler 4 (gcc (C) and g++ (C++)) and

  • 0

I am using a Wind River Compiler 4 (gcc (C) and g++ (C++)) and it compiles all my projects without any problems. Now I have to use Coverity Static Analysis to check my code. I have configured the specific compilers. For the C-Code (gcc) there are no problems and I can run the analysis, but for the C++-Code (g++) I got a lot of errors:

.../c++config.h", line 214: error #40:
    expected an identifier
inline namespace __gnu_cxx_ldbl128 { }
       ^

.../c++config.h", line 214: error #326:
    inline specifier allowed on function declarations only
inline namespace __gnu_cxx_ldbl128 { }
^

.../c++config.h", line 214: error #65:
    expected a ";"
inline namespace __gnu_cxx_ldbl128 { }
                                   ^
.../include/string.h", line 76: error #312:
    cannot overload functions distinguished by return type alone
extern __const void *memchr (__const void *__s, int __c, size_t __n)
                     ^

.../include/string.h", line 116: error #312:
    cannot overload functions distinguished by return type alone
extern "C++" __const void *memchr (__const void *__s, int __c, size_t __n)
                     ^

It seem to be some C++11 specific features like the inline namespace but the code doesn’t use these features. The errors above are produced with a HelloWorld-Code:

#include "stdio.h"
#include "util.h"
#include <string>
#include "string.h"

using namespace std;

int main()
{
    printf("Hello World, C++ version: %d.%d.%d\r\n",__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__);

    return 0;
}

I have tried to set the c++ standard with the g++ option

-std=c++98

but the result doesn’t changed.

The Test-Code is in a big build hierarchy but the steps for Coverity are like this:

  1. target and env set (Wind River 4 Linux)
  2. make clean
  3. cov-configure with compiler dir and type
  4. cov-build with the correct “make all” command that works alone
  5. cov-analyze
  6. if (no_error) cov-commit-defects

I have also configured Coverity to replace all “inline namespace” with “namespace” during the cov-build (--ppp-translator replace/inline namespace/namespace). The inline errors disappeared but it produces more of this overload errors and no succecfully build. Also tried to remove the “C++” the same way but didn’t work there are always more errors.

Does anybody have an idea what is the problem here? And how can I get the Coverity build without errors? Maybe I can configure Coverity to ignore c++ standard headers but I don’t now how?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:27:32+00:00Added an answer on May 28, 2026 at 3:27 pm

    Workaround by Coverity Support:

    The inline namespace is a known bug in Coverity. To bypass it, configure Coverity with the following additional options (in the config file):

      <begin_command_line_config></begin_command_line_config> 
      <add-arg>--ppp_translator</add_arg> 
      <add_arg>replace/inline namespace ([_a-zA-Z0-9]*)\s+\{\s*\}/namespace $1 { } using namespace $1;</add_arg> 
    </options>
    

    After that we got some other errors but they seem to belong all to string definitions. Now add a Coverity define at the beginning of coverity-compiler-compat.h (also in the config dir):

    #define __COVERITY_NO_STRING_NODEFS__
    

    After these changes the cov-build runs without errors and the analysis can be started.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a data frame with 3 variables, which are all wind speeds. I
Using online interfaces to a version control system is a nice way to have
Using PyObjC , you can use Python to write Cocoa applications for OS X.
Using TortoiseSVN against VisualSVN I delete a source file that I should not have
I am representing wind directions using integer values (an Enum) ranging from 0 for
I'm trying to compile a little project that includes windows.h using the clang compiler.
I have a rails app that is combining javascript assets using Jammit , and
I'm using code examples from this article by Rick Strahl: http://www.west-wind.com/weblog/posts/324917.aspx to make async
I have a graph of wind speeds against direction which has a huge numeber
I have developed a system in R for graphing large datasets obtained from wind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.