This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Atomic builtins always defined -- bug or feature?


On Fri, Jun 5, 2009 at 11:47 AM, Andrew Haley<aph@redhat.com> wrote:
> It'll call out to a library function if there isn't a builtin instruction.
> If you want to do a configure check, try running or linking the program.

If I compile with -march=i386, and do ./a.out, it runs without errors.
Here's my .cpp file:

int main()
{
	int x;
	__sync_add_and_fetch(&x, 1);

	return 0;
}

Since I have a main, if __sync_add_and_fetch were undefined, wouldn't
it already be trying to link and give an error?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]