[asterisk-dev] [Code Review] Add -fnested-functions compile flag, if needed.

David Lee reviewboard at asterisk.org
Tue Sep 11 11:30:12 CDT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviewboard.asterisk.org/r/2102/
-----------------------------------------------------------

(Updated Sept. 11, 2012, 11:30 a.m.)


Review request for Asterisk Developers.


Changes
-------

Updated patch per Mark's comments.

 * Provided a prototype for the nested function to avoid GCC bug
 * Simplified nested function definition (turns out it's already being defined in 'main'. No need to double nest)
 * Added comment to RAII_VAR explaining why the nested function requires a prototype


Summary
-------

In order to use nested functions on some versions of GCC (e.g. GCC on OS X), the -fnested-functions flag must be passed to the compiler.

This patch:
* Adds detection logic to ./configure
* Adds AST_NESTED_FUNCTIONS to ./makeopts.in
* Includes AST_NESTED_FUNCTIONS in _ASTCFLAGS


This addresses bug ASTERISK-20399.
    https://issues.asterisk.org/jira/browse/ASTERISK-20399


Diffs (updated)
-----

  /branches/11/Makefile 372844 
  /branches/11/configure UNKNOWN 
  /branches/11/configure.ac 372844 
  /branches/11/include/asterisk/autoconfig.h.in 372844 
  /branches/11/include/asterisk/utils.h 372844 
  /branches/11/makeopts.in 372844 

Diff: https://reviewboard.asterisk.org/r/2102/diff


Testing
-------

Compiled on OS X and Ubuntu 12.04.


Thanks,

David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20120911/b16d98dd/attachment.htm>


More information about the asterisk-dev mailing list