public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/43594]  New: long-standing g++ bug?
@ 2010-03-31  0:11 rwgk at yahoo dot com
  2010-03-31  0:14 ` [Bug c++/43594] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: rwgk at yahoo dot com @ 2010-03-31  0:11 UTC (permalink / raw)
  To: gcc-bugs

//#include <cstdio>

struct values
{
  static const int one = 1;
};

struct counter
{
  int n;

  counter() : n(0) {}

  counter&
  operator,(int const&) { n++; return *this; }
};

int
main()
{
  values vals;
  counter cntr;
  cntr, vals.one;
  //std::printf("%d\n", cntr.n);
  return 0;
}


g++ problem.cpp
/tmp/cc88FSiA.o: In function `main':
problem.cpp:(.text+0x19): undefined reference to `values::one'
collect2: ld returned 1 exit status

I'm getting the same failure with gcc 3.2, 4.1, 4.4, 4.5.0 20100109.
It works as expected with Visual C++ 9.0.
Is this a bug?


-- 
           Summary: long-standing g++ bug?
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rwgk at yahoo dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43594


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/43594] long-standing g++ bug?
  2010-03-31  0:11 [Bug c++/43594] New: long-standing g++ bug? rwgk at yahoo dot com
@ 2010-03-31  0:14 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-03-31  0:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2010-03-31 00:14 -------
Not a bug, see PR 42101.

*** This bug has been marked as a duplicate of 42101 ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43594


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-03-31  0:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-31  0:11 [Bug c++/43594] New: long-standing g++ bug? rwgk at yahoo dot com
2010-03-31  0:14 ` [Bug c++/43594] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).