Feature request, warnings for non safe calls within signal handlers

Jonathan Wakely jwakely.gcc@gmail.com
Thu Mar 15 09:58:00 GMT 2012


On 15 March 2012 09:36, David Brown wrote:
> What you need here is a way of tagging the compilation state with some sort
> of attributes, and a way of having functions and other parts of the code
> check those attributes for particular features.  These features must be
> definable in the user code, not just in the compiler, so they should
> probably have string names and integer values.
[snip]

You might be interested in http://www.artima.com/cppsource/codefeatures.html

I believe the polynomial increases in compilation times and the need
for the global "AllCodeFeatures" container are solvable in C++11, e.g.
by using a variadic class template to represent compile-time strings,
which could be compared and sorted at compile-time to provide a total
order without needing all features to be known a priori.

But that's straying off-topic for this list.



More information about the Gcc-help mailing list