public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
@ 2005-11-21 18:20 ` pinskia at gcc dot gnu dot org
  2006-09-21 14:37 ` [Bug c++/19092] [DR 561] template code does not ignore static functions overloads pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-21 18:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2005-11-21 18:20 -------
*** Bug 24977 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/19092] [DR 561] template code does not ignore static functions overloads
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
  2005-11-21 18:20 ` [Bug c++/19092] g++ accepts code that violates 14.6.4.2 pinskia at gcc dot gnu dot org
@ 2006-09-21 14:37 ` pinskia at gcc dot gnu dot org
  2006-09-21 14:38 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-21 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2006-09-21 14:37 -------
*** Bug 29165 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrew dot stubbs at st dot
                   |                            |com


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


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

* [Bug c++/19092] [DR 561] template code does not ignore static functions overloads
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
  2005-11-21 18:20 ` [Bug c++/19092] g++ accepts code that violates 14.6.4.2 pinskia at gcc dot gnu dot org
  2006-09-21 14:37 ` [Bug c++/19092] [DR 561] template code does not ignore static functions overloads pinskia at gcc dot gnu dot org
@ 2006-09-21 14:38 ` pinskia at gcc dot gnu dot org
  2007-09-08 15:33 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-09-21 14:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-09-21 14:37 -------
http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#561

Suspending since that Defect Report is still open.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


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


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

* [Bug c++/19092] [DR 561] template code does not ignore static functions overloads
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2006-09-21 14:38 ` pinskia at gcc dot gnu dot org
@ 2007-09-08 15:33 ` bangerth at dealii dot org
  2009-03-03 22:07 ` jason at gcc dot gnu dot org
  2009-11-04 16:05 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2007-09-08 15:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from bangerth at dealii dot org  2007-09-08 15:33 -------
*** Bug 33129 has been marked as a duplicate of this bug. ***


-- 

bangerth at dealii dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ian at airs dot com


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


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

* [Bug c++/19092] [DR 561] template code does not ignore static functions overloads
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2007-09-08 15:33 ` bangerth at dealii dot org
@ 2009-03-03 22:07 ` jason at gcc dot gnu dot org
  2009-11-04 16:05 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-03 22:07 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from jason at gcc dot gnu dot org  2009-03-03 22:07 -------
I'm supposed to be drafting this issue.  It is not likely to be a bug under the
eventual resolution.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|SUSPENDED                   |ASSIGNED


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


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

* [Bug c++/19092] [DR 561] template code does not ignore static functions overloads
       [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2009-03-03 22:07 ` jason at gcc dot gnu dot org
@ 2009-11-04 16:05 ` jason at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-04 16:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from jason at gcc dot gnu dot org  2009-11-04 16:05 -------
My drafting to ratify the G++ behavior was adopted at the Santa Cruz meeting,
so this is not a bug.


-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |INVALID


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
                   ` (4 preceding siblings ...)
  2005-07-07  0:25 ` redi at gcc dot gnu dot org
@ 2005-08-24 11:48 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-24 11:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-08-24 11:44 -------
*** Bug 23542 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |veksler at il dot ibm dot
                   |                            |com


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
                   ` (3 preceding siblings ...)
  2004-12-20 21:30 ` bangerth at dealii dot org
@ 2005-07-07  0:25 ` redi at gcc dot gnu dot org
  2005-08-24 11:48 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: redi at gcc dot gnu dot org @ 2005-07-07  0:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From redi at gcc dot gnu dot org  2005-07-07 00:25 -------
Keywords should include "wrong-code", this program should return 0:

static int f(int i)
{
    return 1;
}

int f(long l)
{
    return 0;
}

template <typename T>
    int g(T t)
    {
       return f(t);
    }

int main()
{
   return g(0);
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |redi at gcc dot gnu dot org


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
                   ` (2 preceding siblings ...)
  2004-12-20 20:43 ` bangerth at dealii dot org
@ 2004-12-20 21:30 ` bangerth at dealii dot org
  2005-07-07  0:25 ` redi at gcc dot gnu dot org
  2005-08-24 11:48 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-12-20 21:30 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-12-20 21:30 -------
Actually, we can make this a rejects-valid like so: 
---------------------- 
namespace NS1 { 
  struct X {}; 
  void foo(X); 
} 
 
namespace NS2 { 
  static void foo(NS1::X); 
   
  template <typename T> 
  void bar() { 
    foo(T()); 
  } 
} 
 
template void NS2::bar<NS1::X> (); 
----------------------- 
Since NS2::foo is static, it isn't an eligible overload, so NS1::foo 
should be called. However, gcc doesn't realize this: 
 
g/x> c++ x.cc ; ./a.out ; echo $? 
x.cc: In function `void NS2::bar() [with T = NS1::X]': 
x.cc:15:   instantiated from here 
x.cc:11: error: call of overloaded `foo(NS1::X)' is ambiguous 
x.cc:7: error: candidates are: void NS2::foo(NS1::X) 
x.cc:3: error:                 void NS1::foo(NS1::X) 
 
This fails with all versions of gcc I have. 
 
W. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
      Known to fail|                            |2.95.3 3.2.3 3.3.1 3.3.4
                   |                            |3.4.3 4.0.0


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
  2004-12-20 18:32 ` [Bug c++/19092] " bagnara at cs dot unipr dot it
  2004-12-20 18:50 ` pinskia at gcc dot gnu dot org
@ 2004-12-20 20:43 ` bangerth at dealii dot org
  2004-12-20 21:30 ` bangerth at dealii dot org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2004-12-20 20:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-12-20 20:43 -------
Indeed. It seems as if I am not the only one who wasn't aware of the 
restriction that dependent function calls can only be to functions with 
external linkage. 
 
This should be low priority, since we only accept invalid code. 
 
W. 

-- 


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
  2004-12-20 18:32 ` [Bug c++/19092] " bagnara at cs dot unipr dot it
@ 2004-12-20 18:50 ` pinskia at gcc dot gnu dot org
  2004-12-20 20:43 ` bangerth at dealii dot org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-20 18:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-12-20 18:50 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |accepts-invalid
   Last reconfirmed|0000-00-00 00:00:00         |2004-12-20 18:50:01
               date|                            |


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


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

* [Bug c++/19092] g++ accepts code that violates 14.6.4.2
  2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
@ 2004-12-20 18:32 ` bagnara at cs dot unipr dot it
  2004-12-20 18:50 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: bagnara at cs dot unipr dot it @ 2004-12-20 18:32 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bagnara at cs dot unipr dot it  2004-12-20 18:32 -------
Created an attachment (id=7784)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=7784&action=view)
Small program that allows to reproduce the problem


-- 


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


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

end of thread, other threads:[~2009-11-04 16:05 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19092-1710@http.gcc.gnu.org/bugzilla/>
2005-11-21 18:20 ` [Bug c++/19092] g++ accepts code that violates 14.6.4.2 pinskia at gcc dot gnu dot org
2006-09-21 14:37 ` [Bug c++/19092] [DR 561] template code does not ignore static functions overloads pinskia at gcc dot gnu dot org
2006-09-21 14:38 ` pinskia at gcc dot gnu dot org
2007-09-08 15:33 ` bangerth at dealii dot org
2009-03-03 22:07 ` jason at gcc dot gnu dot org
2009-11-04 16:05 ` jason at gcc dot gnu dot org
2004-12-20 18:31 [Bug c++/19092] New: g++ accepts code that violates 14.6.4.2 bagnara at cs dot unipr dot it
2004-12-20 18:32 ` [Bug c++/19092] " bagnara at cs dot unipr dot it
2004-12-20 18:50 ` pinskia at gcc dot gnu dot org
2004-12-20 20:43 ` bangerth at dealii dot org
2004-12-20 21:30 ` bangerth at dealii dot org
2005-07-07  0:25 ` redi at gcc dot gnu dot org
2005-08-24 11:48 ` 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).