From: <gb...@di...> - 2001-06-05 05:56:34
|
Hi, > - the "extern "C" void exit(int) throw();" lines in the configure test > programs were interfering with a "extern void exit(int);" > declaration in SGI's unistd.h. Deleting the " throw()"s fixed it. > (Note: when I run autoconf 2.13 directly, it doesn't have this > problem.) Hmm, I don't know where does this throw() comes from but I recently realized it was added in autoconf for some Linux distributions... > - the extended signal handlers test program was failing. Eventually I > tracked it down to SGI's C++ compiler: it was optimizing out one of > the writes to the page[] array, and moving the read of > handler_called above the writes. Here's a patch which fixed it. > Just declaring the variables volatile doesn't seem to do it; I had > to insert the system call to force synchronization: What about the test for a sigcontext subterfuge ? [According to what you have said, I expect it to fail too] > There's probably a cleaner way to do this... but it works. I probably > didn't see this problem before since I always ran configure with my > local machine's environment instead of the official SGI freeware build > environment, which may have changed the level of optimization used > while configuring. Thanks, your SGI compiler is definitely a really good optimizing compiler. ;-) I think we have to come up with a subterfuge to fool the compiler's data flow analyzer. Something like a fake use after each write. Brian, is your compiler still optimizing enough to inline a function defined after its call is issued ? Let's have for example: static void foo(int *); int main() { int some_int; foo(&some_int); } void foo(int *) { printf("foo\n"); } Is foo() inlined into the main() function ? Thanks, Gwenol=E9. |