[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #8 from manu at gcc dot gnu dot org 2010-06-04 16:03 --- As mentioned in the comments above, there is an easy way to achieve this already without needing to make the compiler more complex and slower. So I will close this as WONTFIX. -- manu at gcc dot gnu dot org changed: What|Removed |Added CC||manu at gcc dot gnu dot org Status|UNCONFIRMED |RESOLVED Resolution||WONTFIX http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #1 from pinskia at gcc dot gnu dot org 2010-05-26 15:51 --- Well in C++, it is an ODR violation if the Translation units don't define Abc::meth_used and Abc::meth_unused the same. The linkage on these functions is called vague. Exporting them will increase link time in most cases. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #2 from jakub at gcc dot gnu dot org 2010-05-26 16:34 --- GCC has -fkeep-inline-functions, perhaps that's what you are looking for. That said, I still don't understand why you need something like that. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #3 from jwakely dot gcc at gmail dot com 2010-05-26 16:36 --- If you don't want the functions to be treated as inline don't make them inline Have you tried -fkeep-inline-functions ? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #4 from yuri at tsoft dot com 2010-05-26 16:37 --- Why this is useful, as I wrote above, to eliminate the need for c++ coding for binding with other languages. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #5 from yuri at tsoft dot com 2010-05-26 16:43 --- -fkeep-inline-functions leaves them, but it will also leave all inline functions, not only public ones. This will, I guess, blow up the size of the object since there can be a lot of internal inlines that shouldn't appear in the object. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #6 from pinskia at gcc dot gnu dot org 2010-05-26 16:45 --- What is a public inline function vs a non one in C++ except for static ones? (oh and maybe anonymous namespace ones). In fact functions with just inline is a vague linkage function. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285
[Bug c++/44285] Need an option that will create symbols for all public c++ methods, not only for those which bodies are outside the class declaration
--- Comment #7 from jwakely dot gcc at gmail dot com 2010-05-26 16:55 --- If you only want meth_used and meth_unused to be emitted but you insist on making them inline, then put them in a separate translation unit and compile that with -fkeep-inline-functions. If I understand what you want then you can already do it with no need for new attributes or visibility types. You just need to structure your code appropriately. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44285