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

Bug#829604: marked as done (g++-6: In c++11/14 mode whitespaces are ignored between enum type and ::)



Your message dated Thu, 07 Feb 2019 03:13:19 +0000
with message-id <E1gra7r-000G9u-7I@fasolo.debian.org>
and subject line Bug#920171: Removed package(s) from unstable
has caused the Debian Bug report #829604,
regarding g++-6: In c++11/14 mode whitespaces are ignored between enum type and ::
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
829604: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=829604
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: g++-6
Version: 6.1.1-8
Severity: normal

Dear maintainer,

I've got a wired behavior with the attached test case:

I can compile the file without problems when I specify -std=c++03.

However, with -std=c++11 I get an error in line 11:

error: enum test::enu is not a class or namespace:
  friend test::enu ::wow();

This happens with both g++5 and g++6.

Obviously, when I remove the "::" before "wow" then I get an error in line 35
because now the friend declaration is assumed to be in the namespace "fun" (as
it should be) and the "wow" function defined in the global namespace is not
assumed to be friend.

If I declare wow() to be of return type "int" then everything works as
expected.

Since the code in question that brought me here is in part generated by bison
(cf: #811992) the only way I currently see to quell this problem and fix that
bug
is to force -std=c++03.

Best,
Gert



-- System Information:
Debian Release: stretch/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.6.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages g++-6 depends on:
ii  gcc-6            6.1.1-8
ii  gcc-6-base       6.1.1-8
ii  libc6            2.22-13
ii  libgmp10         2:6.1.1+dfsg-1
ii  libisl15         0.17.1-1
ii  libmpc3          1.0.3-1
ii  libmpfr4         3.1.4-2
ii  libstdc++-6-dev  6.1.1-8
ii  zlib1g           1:1.2.8.dfsg-2+b1

g++-6 recommends no packages.

Versions of packages g++-6 suggests:
pn  g++-6-multilib    <none>
pn  gcc-6-doc         <none>
pn  libstdc++6-6-dbg  <none>

-- no debconf information
namespace test {
  enum enu {A, B};
};

test::enu wow();

namespace fun {
    class G {
      friend test::enu ::wow();
      G();
      test::enu  k; 
    };
    
    class H   {
    public: 
      H();
      test::enu  i; 
    };
    G::G():
      k(test::A)
    {
    }
    
    H::H()
    {
       i = wow(); 
    }
}

test::enu wow()
{
  fun::G g;
  return g.k; 
}
  
  

int main(int, char**)
{
  fun::morefun::H h; 
  return static_cast<int>(h.i); 
}

--- End Message ---
--- Begin Message ---
Version: 6.5.0-2+rm

Dear submitter,

as the package gcc-6 has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/920171

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
ftpmaster@ftp-master.debian.org.

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply to: