(no subject)

2007-05-10 Thread Brian Barrett

Hi all -

I've run into two sets of warnings in the LT2 libltdl code when using  
GCC (4.0.1 on OS X in this case, although they will occur with any  
recent version of GCC on at least OS X and Linux).  I compiled with  
CFLAGS set to: -Wall -Wundef -Wno-long-long -Wsign-compare -Wmissing- 
prototypes -Wstrict-prototypes -Wcomment -pedantic -Wno-long-double - 
Werror-implicit-function-declaration -finline-functions -fno-strict- 
aliasing which are the flags we use for Open MPI.


In file included from libltdl/loaders/dlopen.c:33:
./libltdl/libltdl/lt__private.h:77:63: warning: __STRICT_ANSI__ is  
not defined


libltdl/loaders/preopen.c: In function 'free_symlists':
libltdl/loaders/preopen.c:245: warning: ISO C forbids braced-groups  
within expressions


There are many more of both warnings, but I only included each once.   
I've attached a patch against the head of the cvs repository that  
seems to clear both issues up.  I couldn't figure out why the GCC- 
specific version of LT_STMT_START and LT_STMT_END were needed -- GCC  
seems to always accept the do ... while(0) version of the macros, and  
doesn't emit warnings when they're in use.


With the patch, there are still three warnings that I see, that I'm  
unable to find the best way to handle.  Two are object pointer -  
function pointer casting and one is a declaration warning in libltdlS.c:


libltdl/ltdl.c: In function 'loader_init_callback':
libltdl/ltdl.c:165: warning: ISO C forbids conversion of object  
pointer to function pointer type

libltdlS.c:9: warning: function declaration isn't a prototype
libltdlS.c:23: warning: ISO C forbids conversion of function pointer  
to object pointer type


In Open MPI, we're overly particular about warnings, so we've used a  
union to cast between object and function pointers.  Not my favorite  
thing, but some people are really uppity about warnings ;).  I can't  
find a better solution to getting rid of the warnings, so I didn't  
fix them.  Perhaps someone else can find a less intrusive fix.


The magic of libltdlS.c always takes me a long time to figure out, so  
I didn't spend much time worrying about the function declaration  
without a prototype (easy to work around, if I could figure out  
exactly where that file was coming from...)


Is this something that could be committed to the trunk?  I've tested  
on OS X and Linux with GCC, so it could probably use a bit more  
testing...


Thanks,

Brian


--
  Brian W. Barrett
  Open MPI Team, CCS-1
  Los Alamos National Laboratory



warnings_fix.diff
Description: Binary data


___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool


Re: make check fails on sparc-sun-solaris2.10

2007-05-10 Thread Peter O'Gorman


On May 10, 2007, at 4:16 PM, Elias Pipping wrote:


Hi,

I've run libtool's test suite for different versions on
a sparc-sun-solaris2.10 machine with these results:

  $bzgrep -E '(FAIL|tests failed)' *.log.bz2
  1.5.23b.log.bz2:FAIL: tagdemo-make.test
  1.5.23b.log.bz2:FAIL: tagdemo-make.test
  1.5.23b.log.bz2:FAIL: tagdemo-make.test
  1.5.23b.log.bz2:3 of 108 tests failed


The tagdemo test involves the c++ compiler, I think something is  
wrong with yours. sparc-sun-solaris2.10 passes tagdemo for me with  
both gcc and sun studio compilers.
Please rerun this test with VERBOSE=1. You only need to use the daily  
snapshots (updated today after a while of not updating - sorry).


Thanks,
Peter
--
Peter O'Gorman
http://pogma.com




___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool