Re: pragma interface/implementation

2001-12-06 Thread Andre Poenitz

On Thu, Dec 06, 2001 at 11:32:30AM +0100, Lars Gullik Bjønnes wrote:
> #include   
>  // 1
> #ifdef __GNUG__
> #pragma implementation
> #endif
>  // 2 
> #include "header.h"
>  // 3

So where (1, 2 or 3) goes

(a)  #include 
(b)  #include "paragraph.h"

?

Andre'



-- 
André Pönitz .. [EMAIL PROTECTED]



Re: pragma interface/implementation

2001-12-06 Thread Andre Poenitz

On Thu, Dec 06, 2001 at 11:20:14AM +0100, Lars Gullik Bjønnes wrote:
> Andre Poenitz <[EMAIL PROTECTED]> writes:
> 
> | Can anybody please explain the proper usage of '#pragma interface' and
> | '#pragma implementation'?
> 
> info gcc

I read that twice. I do not understand it.
 
> mark all class definition files with 
> 
> #pragma interface

Where? At the very top after the include gueard in the header?

> and the source files for the class with
> 
> #pragma implementation
> 
> this must be set befor the include of the class header file.

Before everything or before the class include? If so, would it be sensble
to have the class include as the last included item? Does it matter?

> I am not sure how large the benefit is for gcc-3.x.y (or 2.96 for that
> matter) but with gcc 2.95 and earlier the benefits were fairly huge.

I tried it with 2.95.2 on one of my own files, and the change in .o size
was about 200 bytes in a 200_k_ object (with -g).

I am curently asking in gnu.g++.help...

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]



pragma interface/implementation

2001-12-06 Thread Andre Poenitz


Can anybody please explain the proper usage of '#pragma interface' and
'#pragma implementation'?

After reading the info pages I don't really see any benifit in our cases
since we are using seperate declaration/definition files anyway, don't we?

Andre'

-- 
André Pönitz .. [EMAIL PROTECTED]