incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-441) [IBM VAC++ 6.0] ld duplicate symbol warnings for trivially inline functions
Date Fri, 08 Jun 2007 00:39:26 GMT

    [ https://issues.apache.org/jira/browse/STDCXX-441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12502585
] 

Martin Sebor commented on STDCXX-441:
-------------------------------------

Interestingly, the documentation of the -qstaticinline option in the XLC++ 8.0 Reference Manual
suggests that inline functions shouldn't be duplicated (see below). Neither the options or
explicitly marking the trivial function in the test case inline made any difference.

-qstaticinline: This option controls whether inline functions are treated as static or extern.
By default, XL C/C++ treats inline functions as extern. Only one function body is generated
for a function marked with the inline function specifier, regardless of how many definitions
of the function appear in different source files.

> [IBM VAC++ 6.0] ld duplicate symbol warnings for trivially inline functions
> ---------------------------------------------------------------------------
>
>                 Key: STDCXX-441
>                 URL: https://issues.apache.org/jira/browse/STDCXX-441
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: VisualAge C++ 6.0
>            Reporter: Martin Sebor
>
> $ cat t.cpp && xlC -qversion || true && xlC -c -DTU1 t.cpp -o 1.o &&
xlC -c t.cpp -o 2.o && xlC -G -brtl 1.o 2.o -o lib.so
> struct S { void foo () { } };
> #ifdef TU1
> void bar (S s) { s.foo (); }
> #else
> void baz (S s) { s.foo (); }
> #endif
> C for AIX version 6.0.0.0
> ld: 0711-224 WARNING: Duplicate symbol: .S::foo()
> ld: 0711-224 WARNING: Duplicate symbol: S::foo()
> ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message