In a fantastically unique edge-case, one of your variable declarations is colliding with a system macro:
In file included from stanExports_irt.cc:5:
./stanExports_irt.h:638:10: error: expected member name or ';' after declaration specifiers
double BSD;
~~~~~~ ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/sys/param.h:72:17: note: expanded from macro 'BSD'
#define BSD 199506 /* System version (year & month). */
^
In file included from stanExports_irt.cc:5:
./stanExports_irt.h:1437:11: error: expression is not assignable
BSD = std::numeric_limits<double>::quiet_NaN();
~~~ ^
./stanExports_irt.h:1439:11: error: expression is not assignable
BSD = context__.vals_r("BSD")[(1 - 1)];
~~~ ^
3 errors generated.
I’d guess that it would fail similarly for other BSD-based systems as well