From issues-return-2028-apmail-stdcxx-issues-archive=stdcxx.apache.org@stdcxx.apache.org Mon Jun 02 11:32:14 2008 Return-Path: Delivered-To: apmail-stdcxx-issues-archive@locus.apache.org Received: (qmail 94597 invoked from network); 2 Jun 2008 11:32:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 2 Jun 2008 11:32:14 -0000 Received: (qmail 28794 invoked by uid 500); 2 Jun 2008 11:32:17 -0000 Delivered-To: apmail-stdcxx-issues-archive@stdcxx.apache.org Received: (qmail 28781 invoked by uid 500); 2 Jun 2008 11:32:17 -0000 Mailing-List: contact issues-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list issues@stdcxx.apache.org Received: (qmail 28770 invoked by uid 99); 2 Jun 2008 11:32:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 04:32:16 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 02 Jun 2008 11:31:29 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C31A4234C12F for ; Mon, 2 Jun 2008 04:31:50 -0700 (PDT) Message-ID: <459283188.1212406310797.JavaMail.jira@brutus> Date: Mon, 2 Jun 2008 04:31:50 -0700 (PDT) From: "Farid Zaripov (JIRA)" To: issues@stdcxx.apache.org Subject: [jira] Commented: (STDCXX-890) [HP aCC 6] add __attribute__((noreturn)) In-Reply-To: <1247809334.1208926171737.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-890?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12601601#action_12601601 ] Farid Zaripov commented on STDCXX-890: -------------------------------------- MSVC (and ICC/Windows) also supports [__declspec (noreturn)|http://msdn.microsoft.com/en-us/library/k6ktzx3s(VS.80).aspx] to indicate that a function doesn't return. But definition #define _RWSTD_ATTRIBUTE_NORETURN __declspec (noreturn) in _config-msvc.h causes an error's: {noformat} D:\stdcxx\trunk\include\rw/_defs.h(1158) : error C2144: syntax error : 'int' should be preceded by ';' D:\stdcxx\trunk\include\rw/_defs.h(1158) : warning C4091: '__declspec(noreturn)' : ignored on left of 'int' when no variable is declared {noformat} The possible solution is moving the _RWSTD_ATTRIBUTE_NORETURN in _defs.h header before the function name , i.e. {noformat} // called for failed assertions void _RWSTD_EXPORT _RWSTD_ATTRIBUTE_NORETURN __rw_assert_fail (const char*, const char*, int, const char*); {noformat} or {noformat} // called for failed assertions _RWSTD_ATTRIBUTE_NORETURN void _RWSTD_EXPORT __rw_assert_fail (const char*, const char*, int, const char*); {noformat} > [HP aCC 6] add __attribute__((noreturn)) > ---------------------------------------- > > Key: STDCXX-890 > URL: https://issues.apache.org/jira/browse/STDCXX-890 > Project: C++ Standard Library > Issue Type: Improvement > Components: Build > Affects Versions: 4.2.0 > Environment: aCC: HP aC++/ANSI C B3910B A.06.00 [Aug 25 2004] > Reporter: Martin Sebor > Assignee: Martin Sebor > Fix For: 4.2.1 > > Original Estimate: 1h > Time Spent: 1h > Remaining Estimate: 0h > > Like gcc, HP aCC 6 supports [{{\_\_attribute__((noreturn))}}|http://docs.hp.com/en/7730/newhelp0610/pragmas.htm#noreturn] to indicate to the optimizer that a function does not return. Making use of the attribute on the declaration of {{\_\_rw::__rw_assert_fail()}} will silence certain warnings and might improve generated code. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.