On 16/01/2008, at 8:49 PM, Patrick Aboyoun wrote:
When I try to compile the "mutant" hello world application on the
4.2.1
version I get the following error message:
Leopard$ g++-4.2 -arch x86_64 -g -O2 -march=nocona -fasm-blocks
hello.cpp
In file included from hello.cpp:2:
hello.hpp: In function ?int atomic_exchange_and_add(int*, int)?:
hello.hpp:15: error: expected `)' before ?:? token
and I have no issue when I compile on the 4.0.1 version
Leopard$ g++-4.0 -arch x86_64 -g -O2 -march=nocona -fasm-blocks
hello.cpp
{...object file created without issue...}
I don't know, but I would suspect that your problem is in using '-arch x86_64' and '-march=nocona'. As I understand the first means "build this for the full range of present and future Apple 64 bit Intel hardware and, if specified, lipo it up into a fat binary' While the second means 'optimise this for nocona architecture.' I would have thought you could combine -march nocona with -m64, but combining it with -arch x86_64 might just confuse the compiler. Bill