A simple(?) #pragma question

From: Bob Carragher (bobthedancer_at_yahoo.com)
Date: Tue Feb 13 2001 - 02:31:24 GMT


Hello!

I have a hopefully simple question regarding the #pragma
construct.  Specifically, I'm using the #pragma construct
available under g++ to minimize duplication of symbols
and templates when an include file with class definitions
is included in multiple source files.

Unfortunately, if I use this feature in my C++ files,
then UPS does not appear able to obtain the class
definitions in any except the class implementation file.
I have included a small example below demonstrating this
behavior.  It is a uuencoded, gzipped tar archive.  There
is a Makefile, and simply typing "make" will create and
launch ups (assumed to be in one's path) on the problematic
version of the program.

Within ups, create a breakpoint anywhere in the code, then
start it.  Click on variable "a" in main().  You will see
the following listing for it:

     undefined struct myPragmaClass <a> <Zero size object>

By avoiding the use of the #pragma construct (which can be
done by using "make no_prob"), this problem does not occur.

So, my hopefully simple question is, is this a problem with
using #pragma and trying to debug under UPS, or am I just
using a bad coding style?  If it is the former, is this
something that can be handled by a relatively simple fix
to UPS?

Thanks!

			Bob Carragher

P.S.  Here is the output of "ups -V" (my system is an Intel
Pentium III running RedHat Linux 6.2):

ups version 3.35 (build date: Fri Sep  8 12:28:12 PDT 2000)

Library versions:
        arg version 1.26 (build date: Sun Jun 4 22:40:57 BST 1995)
        obj version 1.36 (build date: Sun Jun 4 22:40:13 BST 1995)
        edit version 1.17 (build date: Tue Jun 20 22:57:59 BST 1995)
        Men3wn version 1.34 (build date: Sun Jun 4 22:38:13 BST 1995)
        mtrprog version 1.41 (build date: Sun Jun 4 22:26:40 BST 1995)
        ukcprog version 1.22 (build date: Tue Jan 10 10:03:27 GMT 1995)
        wn version 1.86 (build date: Sun Jun 4 22:32:12 BST 1995)

Target drivers: 
        C interpreter output files
        C source files
        Native support for i686-pc-linux-gnu ELF object files

------------------------------Cut Here------------------------------
begin 644 to_ups.tar.gz
M'XL("%&;B#H"`W1O7W5P<RYT87(`[=U-;^-$&`?P*3UU0,T*OL!LNH>VV[JV
M$SO:M`LJ95N0MMI5>3NNG-AIK'7LD#C;IE60N/4$7'K@!$AP_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