stdcxx-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STDCXX-890) [HP aCC 6] add __attribute__((noreturn))
Date Mon, 02 Jun 2008 11:31:50 GMT

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


Mime
View raw message