public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33289]  New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
@ 2007-09-03  8:37 jakub at gcc dot gnu dot org
  2007-09-05 23:27 ` [Bug c++/33289] " jakub at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-09-03  8:37 UTC (permalink / raw)
  To: gcc-bugs

typedef __SIZE_TYPE__ size_t;
extern "C" int __sprintf_chk (char *__restrict, int, size_t, const char *, ...)
throw ();
extern "C" int __sprintf_chk (char *__restrict, int, size_t, const char *, ...)
throw ();

fails to compile with:
/tmp/4.C:3: error: declaration of 'int __sprintf_chk(char*, int, size_t, const
char*, ...) throw ()' throws different exceptions
/tmp/4.C:2: error: from previous declaration 'int __sprintf_chk(char*, int,
long unsigned int, const char*, ...)'

(but compiles with -fno-builtin-__sprintf_chk).  Surprisingly, similar
testcase with say __memcpy_chk compiles just fine.
The problem is that when we create builtins,
1) ATTR_NOTHROW among builtin attributes causes just TREE_NOTHROW being set,
   but doesn't create any kind of exception specification
2) the C++ FE sets DECL_ANTICIPATED only on builtins that don't start with
   two underscores.
I wonder why the limitation on DECL_ANTICIPATED, I can understand that for
__builtin_* or __sync_*, but __*_chk when not __builtin___*_chk should be
IMHO DECL_ANTICIPATED.

Also, at least for Linux NOTHROW on printf, fprintf etc. is wrong, only
sprintf/snprintf can't throw, printf/fprintf/scanf etc. are (optional)
cancellation points and during pthread_cancel can cause forced unwinding.


-- 
           Summary: [4.2/4.3 Regression] __sprintf_chk etc. not
                    DECL_ANTICIPATED
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jakub at gcc dot gnu dot org


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


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

* [Bug c++/33289] [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
@ 2007-09-05 23:27 ` jakub at gcc dot gnu dot org
  2007-09-10 22:39 ` [Bug c++/33289] [4.2 " pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-09-05 23:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jakub at gcc dot gnu dot org  2007-09-05 23:27 -------
Subject: Bug 33289

Author: jakub
Date: Wed Sep  5 23:27:17 2007
New Revision: 128160

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128160
Log:
        PR c++/33289
        * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
        on __*_chk non-__builtin_* decls.

        * g++.dg/eh/builtin4.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/eh/builtin4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
  2007-09-05 23:27 ` [Bug c++/33289] " jakub at gcc dot gnu dot org
@ 2007-09-10 22:39 ` pinskia at gcc dot gnu dot org
  2007-09-25  9:52 ` jakub at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-10 22:39 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.2/4.3 Regression]        |[4.2 Regression]
                   |__sprintf_chk etc. not      |__sprintf_chk etc. not
                   |DECL_ANTICIPATED            |DECL_ANTICIPATED
   Target Milestone|---                         |4.2.2


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
  2007-09-05 23:27 ` [Bug c++/33289] " jakub at gcc dot gnu dot org
  2007-09-10 22:39 ` [Bug c++/33289] [4.2 " pinskia at gcc dot gnu dot org
@ 2007-09-25  9:52 ` jakub at gcc dot gnu dot org
  2007-09-28  4:03 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2007-09-25  9:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2007-09-25 09:52 -------
Subject: Bug 33289

Author: jakub
Date: Tue Sep 25 09:52:15 2007
New Revision: 128754

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128754
Log:
        PR c++/33289
        * decl.c (builtin_function_1): Set DECL_ANTICIPATED also
        on __*_chk non-__builtin_* decls.

        * g++.dg/eh/builtin4.C: New test.

Added:
    branches/redhat/gcc-4_1-branch/gcc/testsuite/g++.dg/eh/builtin4.C
Modified:
    branches/redhat/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/redhat/gcc-4_1-branch/gcc/cp/decl.c
    branches/redhat/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-09-25  9:52 ` jakub at gcc dot gnu dot org
@ 2007-09-28  4:03 ` mmitchel at gcc dot gnu dot org
  2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-09-28  4:03 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-09-28  4:03 ` mmitchel at gcc dot gnu dot org
@ 2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
  2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-10-09 19:30 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from mmitchel at gcc dot gnu dot org  2007-10-09 19:20 -------
Change target milestone to 4.2.3, as 4.2.2 has been released.


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.2                       |4.2.3


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
@ 2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
  2008-03-11  3:26 ` cnstar9988 at gmail dot com
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-02-01 17:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jsm28 at gcc dot gnu dot org  2008-02-01 16:54 -------
4.2.3 is being released now, changing milestones of open bugs to 4.2.4.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.3                       |4.2.4


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
@ 2008-03-11  3:26 ` cnstar9988 at gmail dot com
  2008-05-19 20:28 ` jsm28 at gcc dot gnu dot org
  2009-03-30 22:17 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: cnstar9988 at gmail dot com @ 2008-03-11  3:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from cnstar9988 at gmail dot com  2008-03-11 03:25 -------
when into 4.2.4?
gcc-4_2-branch

Thanks!


-- 


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2008-03-11  3:26 ` cnstar9988 at gmail dot com
@ 2008-05-19 20:28 ` jsm28 at gcc dot gnu dot org
  2009-03-30 22:17 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jsm28 at gcc dot gnu dot org  2008-05-19 20:23 -------
4.2.4 is being released, changing milestones to 4.2.5.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.2.4                       |4.2.5


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


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

* [Bug c++/33289] [4.2 Regression] __sprintf_chk etc. not DECL_ANTICIPATED
  2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2008-05-19 20:28 ` jsm28 at gcc dot gnu dot org
@ 2009-03-30 22:17 ` jsm28 at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-30 22:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from jsm28 at gcc dot gnu dot org  2009-03-30 22:17 -------
Closing 4.2 branch, fixed in 4.3.


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to fail|                            |4.2.5
         Resolution|                            |FIXED
   Target Milestone|4.2.5                       |4.3.0


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


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

end of thread, other threads:[~2009-03-30 22:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-03  8:37 [Bug c++/33289] New: [4.2/4.3 Regression] __sprintf_chk etc. not DECL_ANTICIPATED jakub at gcc dot gnu dot org
2007-09-05 23:27 ` [Bug c++/33289] " jakub at gcc dot gnu dot org
2007-09-10 22:39 ` [Bug c++/33289] [4.2 " pinskia at gcc dot gnu dot org
2007-09-25  9:52 ` jakub at gcc dot gnu dot org
2007-09-28  4:03 ` mmitchel at gcc dot gnu dot org
2007-10-09 19:30 ` mmitchel at gcc dot gnu dot org
2008-02-01 17:05 ` jsm28 at gcc dot gnu dot org
2008-03-11  3:26 ` cnstar9988 at gmail dot com
2008-05-19 20:28 ` jsm28 at gcc dot gnu dot org
2009-03-30 22:17 ` jsm28 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).