On Sun, Jul 17, 2016 at 10:09 PM, greg7mdp <greg7mdp@xxxxxxxxx> wrote: > Thanks. However that's exactly what it appears to do, i.e. when I compile > with the option -mpopcnt, the macro __POPCNT__ is defined, but is not > defined when the option is not given. > That's exactly what I was looking for! Thanks again. -march=native can be used to enable it *if* its a native CPU feature. It does not depend on the user adding (or not adding) -mpopcnt. You can see all (most?) of the defines for a particular CPU feature with: gcc -march=native -dM -E - </dev/null Jeff