public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Inline functions
@ 1998-05-13 10:04 Michael Meissner
  1998-05-14  1:04 ` Hans Zuidam
  0 siblings, 1 reply; 8+ messages in thread
From: Michael Meissner @ 1998-05-13 10:04 UTC (permalink / raw)
  To: hans, jbuck; +Cc: egcs, fray

| > Joe Buck wrote:
| > You aren't doing something like saying
| > 
| > inline int foo(int x);
| > 
| > in an .h file and then putting the definition of foo(int) in the .c file,
| > are you?
| RTEMS does something like this a lot ;-)  Is there a cpp define
| which allows one to find out the optimization level GCC is going
| to perform?  That could help eliminating those .h inline functions.

__OPTIMIZE__ is defined if any -Ox option is used other than -O0.
__OPTIMIZE_SIZE__ is defined if -Os is used.

--
Michael Meissner, Cygnus Solutions (Massachusetts office)
4th floor, 955 Massachusetts Avenue, Cambridge, MA 02139, USA
meissner@cygnus.com,	617-354-5416 (office),	617-354-7161 (fax)

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Inline functions
@ 1998-05-12 12:36 Mark Hatle
  1998-05-12 15:33 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Mark Hatle @ 1998-05-12 12:36 UTC (permalink / raw)
  To: egcs

Forgive me if this comes up a lot, but I didn't see it on a quick glance
though the mailing list archives.  This is the problem I am having:

I am using the current egcs snapshot on a PPC machine running MkLinux.  I
am trying to compile parts of the Linux server w/o an optimization level
so that I can debug them line by line instead of the lines jumping all
over.

When I compile without optimizations I get linking errors indicating that
none of the inline functions were "compiled into" the object file then I
removed the "-O2" from... I have also tried -O, -O0, -O1 and they produce
the same results.  One advice from someone, I tried to add
-fkeep-inline-functions and got the same outcome.

How can I compile selected files in the Linux server without optimization
and still have the inline functions inline? (or at least compile as
regular functions in that object file?)

--Mark


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~1998-05-14  1:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-05-13 10:04 Inline functions Michael Meissner
1998-05-14  1:04 ` Hans Zuidam
  -- strict thread matches above, loose matches on Subject: below --
1998-05-12 12:36 Mark Hatle
1998-05-12 15:33 ` Richard Henderson
1998-05-12 18:04 ` Jeffrey A Law
1998-05-12 18:04 ` Joe Buck
1998-05-13  1:47   ` Hans Zuidam
1998-05-13  1:58   ` Akim Demaille

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).