-fno-default-inline question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
I am trying to make a library that contains this class:

class C {
  void DefinedInBody(void) {}
  void DeclaredInBody(void);
};
void C::DeclaredInBody() {}

I compile class C with
$ cc -O0 -fno-default-inline -c class.cpp -o class.o

But the object file contains no sign of C::DefinedInBody(), only
C::DeclaredInBody()
$ nm -C class.o
...
T C::DeclaredInBody()

Afaics I am using the right compile options but DefinedInBody() is
still inline code.

The manual has, in section Dialect Options#-fno-default-inline, this
puzzling sentence: Note that these functions will have linkage like
inline functions; they just won't be inlined by default.
I assume the -fno-default-inline flag can prevent linkage like inline
functions. If not, I don't understand the purpose of the flag.

Any help appreciated. TIA Pau



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux