🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.programmer.codewarrior
4 messages
4 total messages Started by Jason Lamport Thu, 01 Nov 2001 08:22
#pragma always_inline on hangs C compiler?
#1121
Author: Jason Lamport
Date: Thu, 01 Nov 2001 08:22
17 lines
1663 bytes
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?

-jason
Re: #pragma always_inline on hangs C compiler?
#1122
Author: meeroh
Date: Thu, 01 Nov 2001 14:04
25 lines
1910 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?

Do you have a recursive function or a mutually recursive pair of 
functions?

meeroh
-- 
Hire me: <http://meeroh.org/hire.html>
Re: #pragma always_inline on hangs C compiler?
#1123
Author: MWRon
Date: Thu, 01 Nov 2001 15:22
42 lines
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
Re: #pragma always_inline on hangs C compiler?
#1124
Author: meeroh
Date: Thu, 01 Nov 2001 16:48
10 lines
1232 bytes
In article <mwron-C8635E.10223301112001@enews.newsguy.com>,
 MWRon <mwron@metrowerks.com> wrote:

>Have you walked away and came back and to see how long it takes.

A watched source file never compiles? :-)

meeroh
-- 
Hire me: <http://meeroh.org/hire.html>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads