This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gnu_inline attribute for C++


On Jul 11, 2007, Geoffrey Keating <geoffk@apple.com> wrote:

> The C++ language, however, doesn't permit such things, and I doubt
> that the C++ frontend is expecting such things to happen.

When both are defined, only the non-gnu_inline will be compiled anyway.

> What happens if you have a structure definition with the same name in
> both functions, and it needs RTTI support?

I guess this would be one of those cases of "if it hurts, don't do
it", but it's quite likely it will just work as long as the class
definitions abide by the ODR, even if an extern inline function
definition is distinct from the non-inline definition.

-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
FSF Latin America Board Member         http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]