Please tell me where the _THROW macro is defined in GCC4 or how to define it manually
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <assert.h>
#include <ctype.h>
#include <climits>
#include <stdexcept>
#include <sys/cdefs.h>
#include <sys/types.h>
void test() { _THROW(std::range_error,"Test"); }
If you want to throw an exception in C++, use the standard C++
throwkeyword:Please refrain from using some compiler-specific internal macro.
If you must define it, here you go: