public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/28514]  New: pch vs. anonymous namespaces
@ 2006-07-27 17:02 bkoz at gcc dot gnu dot org
  2006-07-27 17:04 ` [Bug c++/28514] " bkoz at gcc dot gnu dot org
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: bkoz at gcc dot gnu dot org @ 2006-07-27 17:02 UTC (permalink / raw)
  To: gcc-bugs

Am running into this kind of thing when I convert include/ext/rope and friends
to using anonymous namespace.

This simplified source doesn't show the bug, sadly, but I'll put up
pre-processed code that demonstrates it in a bit.

namespace __gnu_cxx
{
  namespace 
  {
    enum _Tag1 {_S_leaf1, _S_concat1, _S_substringfn1, _S_function1};
  }

  namespace constants
  {
    enum _Tag2 {_S_leaf2, _S_concat2, _S_substringfn2, _S_function2};
  }

  template<typename T>
  struct A
  {
    static void foo(const T i)
    {    
      int j;
      switch(i)
        {
        case _S_concat1: // error here, invalid integer constant
          j = 5;
          break;
        case constants::_S_leaf2:
          j = 5;
          break;
        default:
          j = 0;
        }
    }
  };

Code seems correct, but something about PCH kills it.


-- 
           Summary: pch vs. anonymous namespaces
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bkoz at gcc dot gnu dot org


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


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

end of thread, other threads:[~2006-10-17 11:56 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-27 17:02 [Bug c++/28514] New: pch vs. anonymous namespaces bkoz at gcc dot gnu dot org
2006-07-27 17:04 ` [Bug c++/28514] " bkoz at gcc dot gnu dot org
2006-07-27 17:05 ` bkoz at gcc dot gnu dot org
2006-07-27 22:32 ` bkoz at gcc dot gnu dot org
2006-07-27 22:33 ` bkoz at gcc dot gnu dot org
2006-07-27 22:34 ` [Bug c++/28514] libstdc++ " bkoz at gcc dot gnu dot org
2006-07-29  5:25 ` [Bug c++/28514] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-07-31  8:16 ` jason at gcc dot gnu dot org
2006-07-31  8:20 ` jason at gcc dot gnu dot org
2006-09-04 15:22 ` bkoz at gcc dot gnu dot org
2006-09-07  0:14 ` jason at redhat dot com
2006-10-17 11:49 ` bkoz at gcc dot gnu dot org
2006-10-17 11:52 ` [Bug libstdc++/28514] " bkoz at gcc dot gnu dot org
2006-10-17 11:56 ` bkoz 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).