(Command-line option to suppress warning: -w-thr)
This warning happens when you add an exception specification to a function definition and you throw a type in your function body that is not mentioned in your exception specification.
The following program would generate this warning:
int foo() throw(char*) // I promise to only throw char*s
{
throw 5; // Oops, I threw an integer
return 0;
}
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|