[Asterisk-code-review] headers: Replace typeof with typeof . (asterisk[master])
Matthew Fredrickson
asteriskteam at digium.com
Fri Feb 16 09:37:52 CST 2018
Matthew Fredrickson has posted comments on this change. ( https://gerrit.asterisk.org/8061 )
Change subject: headers: Replace typeof with __typeof__.
......................................................................
Patch Set 1:
> > The usage of typeof is not recommended by GCC within headers. We
> > should avoid that for sure. Asterisk should be a good role model.
> I
> > see no reason why that should block this review.
>
> The Asterisk README states that we require a compiler with GCC
> extensions. This applies to modules as well. The GCC
> documentation you linked on the issue mentions "general-purpose
> header file". None of the Asterisk headers are general purpose,
> they are for Asterisk only. Since we require GCC extensions I feel
> it is not a bug for Asterisk to use GCC extensions in the headers.
>
> Something is disabling GCC extensions and that is the actual bug.
> I'm suspecting net-snmp in FreeBSD is telling us to add -std=c99 or
> similar to CFLAGS. This is why I asked for your makeopts and noisy
> build so we can find out why res_snmp is misbehaving.
>
> Two specific reasons I don't want this change: consistency and
> readability. In master we use typeof in 94 lines of header files,
> none of them currently use __typeof__. In addition I feel that
> __typeof__ is less readable so I'm not thrilled about the idea of
> using it.
Bump. Alexander, were you planning on responding to Corey's comments?
--
To view, visit https://gerrit.asterisk.org/8061
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I0d7a2c62ed256cca19a50340e3c337567ac78e58
Gerrit-Change-Number: 8061
Gerrit-PatchSet: 1
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Matthew Fredrickson <creslin at digium.com>
Gerrit-Comment-Date: Fri, 16 Feb 2018 15:37:52 +0000
Gerrit-HasComments: No
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180216/c8bba90f/attachment.html>
More information about the asterisk-code-review
mailing list