Article View: comp.sys.mac.programmer.codewarrior
Article #1123Re: #pragma always_inline on hangs C compiler?
From: MWRon
Date: Thu, 01 Nov 2001 15:22
Date: Thu, 01 Nov 2001 15:22
42 lines
2533 bytes
2533 bytes
In article <b53899e6.0111010022.779d054@posting.google.com>,
elgoog@strangelight.com (Jason Lamport) wrote:
>Very strange thing: I'm writing a CDEF resource in C. When I put
>
>#pragma always_inline on
>
>near the top of my file and attempt to build, the compiler seems to
>get caught in an infinite loop. It just sits there compiling, with the
>little gear icon spinning next to the source file icon in the project
>window, but it never finishes. It's a very small project (450 lines,
>including comments -- and my coding style uses lots of line-breaks, so
>that's probably more like 300 lines of "normal" code). Without the
>#pragma line, the target compiles and links in about 2 seconds; so I'm
>quite certain that the compiler really is hanging, and not just taking
>a long time.
>
>Any idea why this is happening and how I can prevent it?
I'd be interested to know if there is a case statement involved they
take a long time to inline. Have you walked away and came back and to
see how long it takes. If you have full optimization on, a level 8
inlining and always inlining on it could take quite a while if there was
a case statement.
If you could send a bit of code that shows this we could tell more.
Perhaps the compiler is falling into some loop somehow.
I'd also be curious to how long it takes if you add this
#pragma inline_bottom_up off
with the always_inline
Ron
--
CodeWarrior for Macintosh, v7 and CodeWarrior for Windows, v7
are shipping now !!
Call 1-800-377-5416 US and Canada Only
or write intlsls@metrowerks.com for international orders
Metrowerks - Ron Liechty - MWRon@metrowerks.com
Technical Details
Message-ID:
<mwron-C8635E.10223301112001@enews.newsguy.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwronReferences:
<b53899e6.0111010022.779d054@posting.google.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10bcce,4f0d8bc2a0b16218 X-Google-Attributes: gid10bcce,public X-Google-Thread: f635e,4f0d8bc2a0b16218 X-Google-Attributes: gidf635e,public X-Google-ArrivalTime: 2001-11-01 07:50:38 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!pln-w!spln!dex!extra.newsguy.com!newsp.newsguy.com!mwron From: MWRon <mwron@metrowerks.com> Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac Subject: Re: #pragma always_inline on hangs C compiler? Date: Thu, 01 Nov 2001 10:22:33 -0500 Organization: Metrowerks Lines: 42 Message-ID: <mwron-C8635E.10223301112001@enews.newsguy.com> References: <b53899e6.0111010022.779d054@posting.google.com> NNTP-Posting-Host: p-059.newsdawg.com Posted-And-Mailed: yes User-Agent: MT-NewsWatcher/3.1 (PPC)