diff options
Diffstat (limited to 'js/src/analysis-tests/green-toredptr.cpp')
-rw-r--r-- | js/src/analysis-tests/green-toredptr.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/analysis-tests/green-toredptr.cpp b/js/src/analysis-tests/green-toredptr.cpp new file mode 100644 index 0000000..78df373 --- /dev/null +++ b/js/src/analysis-tests/green-toredptr.cpp @@ -0,0 +1,12 @@ +#include "jstypes.h" + +void GreenFunc(); + +typedef void (JS_REQUIRES_STACK *RedFuncPtr)(); + +RedFuncPtr Test() +{ + // assigning a green function to a red function pointer is ok + RedFuncPtr p = GreenFunc; + return p; +} |