public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59256] New: qualified name in friend function declaration doesn't match previous declaration in inline namespace
@ 2013-11-22 16:34 redi at gcc dot gnu.org
  2013-11-22 17:28 ` [Bug c++/59256] " paolo.carlini at oracle dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: redi at gcc dot gnu.org @ 2013-11-22 16:34 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59256
           Summary: qualified name in friend function declaration doesn't
                    match previous declaration in inline namespace
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: redi at gcc dot gnu.org

I *think* this is valid, and clang accepts it, but G++ doesn't:

namespace detail {
  inline namespace v7 {
    void f();
  }
}

inline namespace v7 {
  template<typename T> class A {
  private:
    A() { }

    friend void detail::f();
  };
}

namespace detail {
  inline namespace v7 {
    void f() { A<int> a; }
  }
}

int main()
{
  detail::f();
}


$ g++ -std=gnu++11 n.cc
n.cc: In function ‘void detail::v7::f()’:
n.cc:10:5: error: ‘v7::A<T>::A() [with T = int]’ is private
     A() { }
     ^
n.cc:18:23: error: within this context
     void f() { A<int> a; }
                       ^


I think the qualified name detail::f should find ::detail::v7::f
>From gcc-bugs-return-435554-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Nov 22 16:36:07 2013
Return-Path: <gcc-bugs-return-435554-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 1312 invoked by alias); 22 Nov 2013 16:36:07 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 1240 invoked by uid 48); 22 Nov 2013 16:36:04 -0000
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/59257] New: usan/*san: Dpcumentation oddness of -fsanitize= / -fsanitize=shift
Date: Fri, 22 Nov 2013 16:36:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: middle-end
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords: documentation
X-Bugzilla-Severity: normal
X-Bugzilla-Who: burnus at gcc dot gnu.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status keywords bug_severity priority component assigned_to reporter cc
Message-ID: <bug-59257-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2013-11/txt/msg02331.txt.bz2
Content-length: 1374

http://gcc.gnu.org/bugzilla/show_bug.cgi?idY257

            Bug ID: 59257
           Summary: usan/*san: Dpcumentation oddness of -fsanitize= /
                    -fsanitize=shift
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: documentation
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org, mpolacek at gcc dot gnu.org

Regarding -fsanitize=*

That option does not appear in
http://gcc.gnu.org/onlinedocs/gcc/Option-Index.html but I think it should.

Actually, I think several other options miss a @opindex entry, too.


Additionally, in the man page, I get:

       -fsanitize=undefined
           Enable UndefinedBehaviorSanitizer, a fast undefined
           behavior detector.  Various computations will be
           instrumented to detect undefined behavior at runtime.
           Current suboptions are:

           *<-fsanitize=shift>
               This option enables checking that the result of a

The < > look odd.


In invoke.texi, one has:

@item -fsanitize=undefined
...
  @item @option{-fsanitize=shift}


Maybe there shouldn't be an @option{}?

It does look okay at http://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html


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

end of thread, other threads:[~2023-09-12 17:05 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-22 16:34 [Bug c++/59256] New: qualified name in friend function declaration doesn't match previous declaration in inline namespace redi at gcc dot gnu.org
2013-11-22 17:28 ` [Bug c++/59256] " paolo.carlini at oracle dot com
2015-03-23 14:47 ` redi at gcc dot gnu.org
2015-03-23 21:18 ` jason at gcc dot gnu.org
2015-06-01 15:20 ` georg@schorsch-tech.de
2015-06-01 15:23 ` georg@schorsch-tech.de
2022-08-26 15:05 ` herring at lanl dot gov
2023-09-12 16:48 ` redi at gcc dot gnu.org
2023-09-12 17:05 ` redi at gcc dot gnu.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).