symbols not resolved... symbols not generated?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all -

I'm running into an issue using static const variables in my template
class, but only with -O0.  I have something like this:

Bar.h

template <typename Foo>
class Bar {
...
public:
  typedef uint32_t SomeType;
  static const SomeType A = 0;
  static const SomeType B = 1;
  static const SomeType C = 2;
...
};

These types are used in Bar member functions, as well as by Foo (who
knows who he is an argument for).

In -O1 and above, it looks like the symbols are never generated, and
this is fine since it's probably folded into the code.  In O0, which
I'm using for debugging, the symbols appear in my object file as 'U'
(unresolved).

I can't seem to make a simple repro case for this, but I thought I'd
throw this up here to see if I'm doing something stupid, or if this is
a bug in gcc (version 4.3.3-5).

Thanks,
  Brian

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux