[asterisk-bugs] [JIRA] (ASTERISK-29287) app.h: C++ compatibility broken

Jean Aunis - Prescom (JIRA) noreply at issues.asterisk.org
Tue Feb 9 08:30:15 CST 2021


Jean Aunis - Prescom created ASTERISK-29287:
-----------------------------------------------

             Summary: app.h: C++ compatibility broken
                 Key: ASTERISK-29287
                 URL: https://issues.asterisk.org/jira/browse/ASTERISK-29287
             Project: Asterisk
          Issue Type: Bug
      Security Level: None
          Components: Applications/General
    Affects Versions: 16.16.0
            Reporter: Jean Aunis - Prescom


The macro AST_DECLARE_APP_ARGS is no longer compatible with C++. This issue looks to have been introduced when fixing gcc-10 warnings.

When compiling this piece of code :
{code}
AST_DECLARE_APP_ARGS(args,
	AST_APP_ARG(arg1);
	AST_APP_ARG(arg2);
);
{code}

g++ gives the following error:

{code}
myapp.cpp:278:2: error: types may not be defined in ‘sizeof’ expressions
  AST_DECLARE_APP_ARGS(args,
{code}

I will provide a patch.



--
This message was sent by Atlassian JIRA
(v6.2#6252)



More information about the asterisk-bugs mailing list