Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved
Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved [message #1077528] Thu, 01 August 2013 17:05 Go to next message
Eclipse UserFriend
Code analysis is not able to resolve any of the GCC atomic builtin functions (gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html).

Code example:

bool foo(false);
while(!__sync_bool_compare_and_swap(&foo, false, true)) {}

I have 'Automated discovery of paths and symbols' enabled for 'GCC C++ Compiler' in C/C++ Build -> Discovery Options

Is there something else I'm missing to get these to cleanly resolve?

TIA
Re: Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved [message #1078096 is a reply to message #1077528] Fri, 02 August 2013 10:35 Go to previous messageGo to next message
Eclipse UserFriend
Paul,
I have a similar issue, I add the path in to the "preprocessor include path"->Entries.

I hope this works for you..
Regards
Re: Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved [message #1078149 is a reply to message #1078096] Fri, 02 August 2013 11:49 Go to previous messageGo to next message
Eclipse UserFriend
I added it manually to:

C/C++ General -> Preprocessor Include Paths -> Entries -> CDT User Setting Entries

and it solved the problem, but is there a way to configure the CDT GCC Built-in Compiler Settings provider to discover these GCC built-in functions automatically?
Re: Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved [message #1082933 is a reply to message #1078149] Fri, 09 August 2013 04:16 Go to previous messageGo to next message
Eclipse UserFriend
Hi, can both of you be more specifix about the solution?

I encoutered a same problem and I'm looking for a quick fix of this !
Re: Code analysis error: Function '__sync_bool_compare_and_swap' could not be resolved [message #1095340 is a reply to message #1077528] Mon, 26 August 2013 20:09 Go to previous message
Eclipse UserFriend
The same problem. Tried -march key in compiler settings but it didn't work out. Looks a bit weird that your include solves the problem as this built-in function doesn't have any header file to be included.
Previous Topic:Toolchain config.
Next Topic:Change the contents of the Code Composer Studio ".cproject" file
Goto Forum:
  


Current Time: Wed May 21 11:58:54 EDT 2025

Powered by FUDForum. Page generated in 0.07062 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top