public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15774] Conflicting function decls not diagnosed
       [not found] <bug-15774-4066@http.gcc.gnu.org/bugzilla/>
@ 2006-06-30  3:10 ` dannysmith at users dot sourceforge dot net
  2007-09-19 21:52 ` dannysmith at users dot sourceforge dot net
  1 sibling, 0 replies; 11+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2006-06-30  3:10 UTC (permalink / raw)
  To: gcc-bugs



-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dannysmith at users dot
                   |dot org                     |sourceforge dot net
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2005-04-30 16:18:12         |2006-06-30 02:48:45
               date|                            |


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
       [not found] <bug-15774-4066@http.gcc.gnu.org/bugzilla/>
  2006-06-30  3:10 ` [Bug c++/15774] Conflicting function decls not diagnosed dannysmith at users dot sourceforge dot net
@ 2007-09-19 21:52 ` dannysmith at users dot sourceforge dot net
  1 sibling, 0 replies; 11+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2007-09-19 21:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dannysmith at users dot sourceforge dot net  2007-09-19 21:52 -------
With 4.1, 4.2 and trunk, there is still no diagnosis of change in calling
convention in decl,  but the bug in generated code is exposed only with
-fno-unit-at-time.
Danny


-- 

dannysmith at users dot sourceforge dot net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|2.95.3 3.3.3 3.4.0 4.0.0    |2.95.3 3.3.3 3.4.0 4.0.0
                   |                            |4.1.0 4.2.1 4.3.0


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
       [not found] <bug-15774-4@http.gcc.gnu.org/bugzilla/>
  2010-12-25 10:41 ` ktietz at gcc dot gnu.org
  2011-01-13 21:52 ` ktietz at gcc dot gnu.org
@ 2011-02-19 22:06 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-02-19 22:06 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

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

--- Comment #9 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-02-19 21:26:39 UTC ---
After discussing in more detail with Jason, I'll close this bug as fixed.


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

* [Bug c++/15774] Conflicting function decls not diagnosed
       [not found] <bug-15774-4@http.gcc.gnu.org/bugzilla/>
  2010-12-25 10:41 ` ktietz at gcc dot gnu.org
@ 2011-01-13 21:52 ` ktietz at gcc dot gnu.org
  2011-02-19 22:06 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2011-01-13 21:52 UTC (permalink / raw)
  To: gcc-bugs

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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org
         AssignedTo|dannysmith at users dot     |ktietz at gcc dot gnu.org
                   |sourceforge.net             |
      Known to fail|                            |

--- Comment #8 from Kai Tietz <ktietz at gcc dot gnu.org> 2011-01-13 21:40:17 UTC ---
This bug is fixed on trunk (4.6) version. But the final solution needs some
more work, so that those kind of issues are handled in type-comparision
directly and double code (as present in the moment) can be avoided.


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

* [Bug c++/15774] Conflicting function decls not diagnosed
       [not found] <bug-15774-4@http.gcc.gnu.org/bugzilla/>
@ 2010-12-25 10:41 ` ktietz at gcc dot gnu.org
  2011-01-13 21:52 ` ktietz at gcc dot gnu.org
  2011-02-19 22:06 ` ktietz at gcc dot gnu.org
  2 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2010-12-25 10:41 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> 2010-12-25 10:41:09 UTC ---
Author: ktietz
Date: Sat Dec 25 10:41:05 2010
New Revision: 168241

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168241
Log:
2010-12-25  Kai Tietz  <kai.tietz@onevision.com>

    PR c++/15774
    * decl.c (decls_match): Check for FUNCTION_DECL
    also for identity of compatible attributes.


ChangeLog gcc/testsuite

2010-12-25  Kai Tietz  <kai.tietz@onevision.com>

    PR c++/15774
    * g++.dg/warn/pr15774-1.C: New test.
    * g++.dg/warn/pr15774-2.C: New test.


Added:
    trunk/gcc/testsuite/g++.dg/warn/pr15774-1.C
    trunk/gcc/testsuite/g++.dg/warn/pr15774-2.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
                   ` (4 preceding siblings ...)
  2004-06-28  7:50 ` giovannibajo at libero dot it
@ 2004-06-29  3:31 ` jason at redhat dot com
  5 siblings, 0 replies; 11+ messages in thread
From: jason at redhat dot com @ 2004-06-29  3:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From jason at redhat dot com  2004-06-29 03:03 -------
Subject: Re:  Conflicting function decls not diagnosed

On 28 Jun 2004 07:40:43 -0000, "giovannibajo at libero dot it" <gcc-bugzilla@gcc.gnu.org> wrote:

> I think the idea is that if you *ADD* an attribute in a later
> redeclaration, you should get an error (like in your testcase), but if
> you omit it in the redeclaration it is ok (the attribute is implicit in
> that case).

> Jason, would you kindly comment on this? We need to know which way to proceed 
> with this patch.

That makes sense to me as a general rule.

Jason


-- 


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
                   ` (3 preceding siblings ...)
  2004-06-28  1:43 ` dannysmith at users dot sourceforge dot net
@ 2004-06-28  7:50 ` giovannibajo at libero dot it
  2004-06-29  3:31 ` jason at redhat dot com
  5 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-28  7:50 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-06-28 07:40 -------
I think the idea is that if you *ADD* an attribute in a later redeclaration, 
you should get an error (like in your testcase), but if you omit it in the 
redeclaration it is ok (the attribute is implicit in that case).

// OK
void foo(void) stdcall;
void foo(void) {}

// OK
void bar(void) stdcall;
void bar(void) stdcall {}

// ERROR
void foobar(void);
void foobar(void) stdcall {}


Jason, would you kindly comment on this? We need to know which way to proceed 
with this patch.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jason at redhat dot com


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
                   ` (2 preceding siblings ...)
  2004-06-28  1:25 ` giovannibajo at libero dot it
@ 2004-06-28  1:43 ` dannysmith at users dot sourceforge dot net
  2004-06-28  7:50 ` giovannibajo at libero dot it
  2004-06-29  3:31 ` jason at redhat dot com
  5 siblings, 0 replies; 11+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2004-06-28  1:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From dannysmith at users dot sourceforge dot net  2004-06-28 01:42 -------
Yes I did test it and it was wrong, because it appears  C++ front end handles 
attributes of class member functions differently than global functions. 
Attributes of member functions are only honoured when declared within class 
definition,  which makes sense to me.  So for something like this (g++-old-
deja/g++.ext/attrib2.C) my patch would cause an error to be emitted.  Should it?
Should C++ require (as does C) that the subsequent definition also have an 
explicit attribute?

// { dg-do run { target i?86-*-* } }
// Test that stdcall doesn't prevent us from using op delete.
// Contributed by Jason Merrill <jason@cygnus.com>

struct A {
  void operator delete (void *) __attribute__ ((stdcall));
};

void foo()
{
  A* ap = new A;
  delete ap;
}

void  A:: operator delete (void *)  { }

int main()
{
  A* ap = new A;
  delete ap;
}

-- 


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
  2004-06-02 10:59 ` [Bug c++/15774] " dannysmith at users dot sourceforge dot net
  2004-06-02 11:37 ` pinskia at gcc dot gnu dot org
@ 2004-06-28  1:25 ` giovannibajo at libero dot it
  2004-06-28  1:43 ` dannysmith at users dot sourceforge dot net
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-06-28  1:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-06-28 01:04 -------
Danny,

did you test the patch? What was the outcome?

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |giovannibajo at libero dot
                   |                            |it


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
  2004-06-02 10:59 ` [Bug c++/15774] " dannysmith at users dot sourceforge dot net
@ 2004-06-02 11:37 ` pinskia at gcc dot gnu dot org
  2004-06-28  1:25 ` giovannibajo at libero dot it
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-02 11:37 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-06-02 11:37 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-06-02 11:37:54
               date|                            |


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


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

* [Bug c++/15774] Conflicting function decls not diagnosed
  2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
@ 2004-06-02 10:59 ` dannysmith at users dot sourceforge dot net
  2004-06-02 11:37 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 11+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2004-06-02 10:59 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to fail|                            |2.95.3 3.3.3 3.4.0 3.5.0


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


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

end of thread, other threads:[~2011-02-19 21:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15774-4066@http.gcc.gnu.org/bugzilla/>
2006-06-30  3:10 ` [Bug c++/15774] Conflicting function decls not diagnosed dannysmith at users dot sourceforge dot net
2007-09-19 21:52 ` dannysmith at users dot sourceforge dot net
     [not found] <bug-15774-4@http.gcc.gnu.org/bugzilla/>
2010-12-25 10:41 ` ktietz at gcc dot gnu.org
2011-01-13 21:52 ` ktietz at gcc dot gnu.org
2011-02-19 22:06 ` ktietz at gcc dot gnu.org
2004-06-02 10:54 [Bug c++/15774] New: " dannysmith at users dot sourceforge dot net
2004-06-02 10:59 ` [Bug c++/15774] " dannysmith at users dot sourceforge dot net
2004-06-02 11:37 ` pinskia at gcc dot gnu dot org
2004-06-28  1:25 ` giovannibajo at libero dot it
2004-06-28  1:43 ` dannysmith at users dot sourceforge dot net
2004-06-28  7:50 ` giovannibajo at libero dot it
2004-06-29  3:31 ` jason at redhat dot com

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).