[asterisk-bugs] [JIRA] (ASTERISK-20850) nested functions aren't portable
John Nemeth (JIRA)
noreply at issues.asterisk.org
Sat Jul 20 02:54:03 CDT 2013
[ https://issues.asterisk.org/jira/browse/ASTERISK-20850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=208097#comment-208097 ]
John Nemeth commented on ASTERISK-20850:
----------------------------------------
I am certainly not disputing the usefulness of RAII_VAR, just that the implementation is going to cause problems. There are multiple OSes (NetBSD, FreeBSD, OSX, possibly others) that are currently evaluating and are likely to move to clang, which doesn't support nested functions. At that point Asterisk would no longer be compilable on those systems.
If I were to provide a tested alternative implementation that doesn't use nested functions would you consider it? I'm not asking if you will accept it, just if you would look at it?
> nested functions aren't portable
> --------------------------------
>
> Key: ASTERISK-20850
> URL: https://issues.asterisk.org/jira/browse/ASTERISK-20850
> Project: Asterisk
> Issue Type: Bug
> Security Level: None
> Components: General
> Affects Versions: 11.1.0
> Environment: CLANG
> Reporter: John Nemeth
>
> Nested functions are a GCC extension that is not sanctioned by C standards, thus the use of them is non-portable. Specifically, CLANG does not support them. CLANG is used by OSX, current versions of FreeBSD, and NetBSD is experimenting with it. The RAII_VAR macro in include/asterisk/utils.h creates nested functions. This prevents Asterisk 11.* from compiling with CLANG.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.asterisk.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the asterisk-bugs
mailing list