[asterisk-bugs] [JIRA] (ASTERISK-20850) [patch]Nested functions aren't portable. Adapting RAII_VAR to use clang/llvm blocks to get the same/similar functionality.
Matt Jordan (JIRA)
noreply at issues.asterisk.org
Sun Jan 25 16:29:36 CST 2015
[ https://issues.asterisk.org/jira/browse/ASTERISK-20850?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=224633#comment-224633 ]
Matt Jordan commented on ASTERISK-20850:
----------------------------------------
Sorry I didn't have a chance to test this patch further until now. I've commented on your review, fixed a few more findings, cleaned up the {{AST_INLINE_API}} issues, and put up a patch for Asterisk 11 here:
https://reviewboard.asterisk.org/r/4370/
> [patch]Nested functions aren't portable. Adapting RAII_VAR to use clang/llvm blocks to get the same/similar functionality.
> --------------------------------------------------------------------------------------------------------------------------
>
> 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: Diederik de Groot
> Attachments: RAII_CLANG.patch
>
>
> 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 was sent by Atlassian JIRA
(v6.2#6252)
More information about the asterisk-bugs
mailing list