Problems compiling regex with gcc3 on aix and hpux

Hi! I get ugly warnings (they look dangerous to me) when I compile boost/regex on AIX and HP-UX with gcc. On Linux and FreeBSD everything is fine. For example /usr/local/gcc-3.3.3/bin/g++ -c -I. libs/regex/src/cregex.cpp compiles without any complains. On aix43 and hpux11 this gives me the attached warning messages. The order of the messages is slightly different on both platforms, but after sorting the output is identical. I use boost-1.31.0 and see no differences with and without boost-1.31.0-regex-patch-20040503. -- Goetz Isenmann

I get ugly warnings (they look dangerous to me) when I compile boost/regex on AIX and HP-UX with gcc.
I've never seen anything quite like that before - those tables are immutable, so multiple copies won't hurt if that's what's happening - but you really need to contact a gcc newsgroup and find out what those messages actually mean. Thanks, John Maddock.

On Wed, Jun 23, 2004 at 01:43:20PM +0100, John Maddock wrote:
I get ugly warnings (they look dangerous to me) when I compile boost/regex on AIX and HP-UX with gcc.
I've never seen anything quite like that before - those tables are immutable, so multiple copies won't hurt if that's what's happening - but you really need to contact a gcc newsgroup and find out what those messages actually mean.
Thanks,
John Maddock.
While searching for this warning message, I found for example: http://lists.boost.org/MailArchives/boost-users/msg03526.php http://mail.python.org/pipermail/c++-sig/2003-May/004138.html http://gcc.gnu.org/ml/gcc/1998-04/msg00819.html So it seems, that weak symbols/weak linking does not work with all object file formats (only with ELF?). -- Goetz Isenmann

I get ugly warnings (they look dangerous to me) when I compile boost/regex on AIX and HP-UX with gcc.
I've never seen anything quite like that before - those tables are immutable, so multiple copies won't hurt if that's what's happening - but you really need to contact a gcc newsgroup and find out what those messages actually mean.
Thanks,
John Maddock.
While searching for this warning message, I found for example:
http://lists.boost.org/MailArchives/boost-users/msg03526.php http://mail.python.org/pipermail/c++-sig/2003-May/004138.html http://gcc.gnu.org/ml/gcc/1998-04/msg00819.html
So it seems, that weak symbols/weak linking does not work with all object file formats (only with ELF?).
Hmmm, the thing is I can't really work around this: the regex lib has a bunch of class-template-specific static data (basically pointers to member functions) that it needs to be able to dispatch to the correct matcher. The warning message is wrong for several reasons IMO: 1) the function isn't inline. 2) the initialiser list can not be omitted because the data is *const*. 3) the semantics of the function should be OK, since the shared data is const and immutable, so multiple copies are OK. I guess you could suppress the warning by removing the "static" declarator for these problem platforms, but it's a fix that really should not be required, otherwise just ignore the warnings if that's acceptable to you... John
participants (2)
-
Goetz Isenmann
-
John Maddock