Re: Problems with dejagnu and c++ tests...

Andrew Cagney
2004-02-04T15:41:48Z

> Well, you could just add "return 1" to skip_cplus_tests on that system.
>
> But in the long run, get_compiler_info needs to be smarter.
> (Really, default_target_compile needs to have a better interface,
> but we can't touch that).
>
> Perhaps we should just kill get_compiler_info and add some more
> code to initialization. Have it compile and run two test programs,
> one in C, and one in C++. Like this:
>
> #include <stdio.h>
> int main ()
> {
> #if defined(__GNUC__)
> printf ("set compiler_info gcc-%d-%d\n", __GNUC__, __GNUC__MINOR__);
> printf ("set gcc_compiled %d\n", __GNUC__);
> else
> printf ("set gcc_compiled 0\n")
> #endif
> }

(aren't we trying to delete gcc_compiled? :-)

> just save the results and have get_compiler_info set the right
> results for the language specified.

Something based on CPP would be more robust, and avoid assumptions such
as the target has output and can correctly compile / execute code.
Consider what happens when trying to bring up a new GDB+GCC+....

Andrew