public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-21534-102@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/21534] New: Declaration in wrong namespace not rejected
@ 2005-05-12 17:52 bangerth at dealii dot org
  2005-05-12 17:55 ` [Bug c++/21534] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 3+ messages in thread
From: bangerth at dealii dot org @ 2005-05-12 17:52 UTC (permalink / raw)
  To: gcc-bugs

This code isn't rejected, though it should be: 
---------------------------- 
namespace NS 
{ 
  template <typename> void f(); 
} 
 
template <typename> void NS::f (int); 
--------------------------- 
It _is_ rejected if NS::f is not a template. 
 
FWIW, icc says this to the snippet: 
tmp/y> icc -Xc -ansi -c x.cc 
x.cc(6): error: function template "NS::f" may not be redeclared in the current 
scope 
  template <typename> void NS::f (int); 
                           ^ 
W.

-- 
           Summary: Declaration in wrong namespace not rejected
           Product: gcc
           Version: 3.4.3
            Status: UNCONFIRMED
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bangerth at dealii dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2021-08-09 20:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-21534-4@http.gcc.gnu.org/bugzilla/>
2021-08-09 20:21 ` [Bug c++/21534] Declaration in wrong namespace not rejected pinskia at gcc dot gnu.org
     [not found] <bug-21534-102@http.gcc.gnu.org/bugzilla/>
2009-12-22 15:18 ` gcc-bugzilla at contacts dot eelis dot net
2005-05-12 17:52 [Bug c++/21534] New: " bangerth at dealii dot org
2005-05-12 17:55 ` [Bug c++/21534] " 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).