Page MenuHomeFreeBSD

libc: Parenthesise qualifier-preserving function definitions
AcceptedPublic

Authored by kfv on Fri, Sep 11, 9:40 PM.
Tags
None
Referenced Files
F171713419: D59600.id186489.diff
Sat, Sep 12, 11:01 PM
F171682462: D59600.id186489.diff
Sat, Sep 12, 4:15 PM
F171643973: D59600.diff
Sat, Sep 12, 9:50 AM
Unknown Object (File)
Fri, Sep 11, 10:23 PM
Unknown Object (File)
Fri, Sep 11, 10:23 PM
Subscribers

Details

Reviewers
dteske
fuz
andrew

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76784
Build 73667: arc lint + arc unit

Event Timeline

kfv requested review of this revision.Fri, Sep 11, 9:40 PM

What is this change required for?

This is required to prevent function-like macros with the same name from being expanded in the definitions once they become active in a later C mode. Without the parentheses, the declarator is rewritten and will not compile. This style is used for similar cases such as mempcpy() too.

I wasn't planning to include a description in the commit body, but perhaps a brief explanation like the one above would be useful?

Yes, please include this explanation in the commit body. It appears somewhat puzzling otherwise.
LGTM and approved for commit.

This revision is now accepted and ready to land.Sat, Sep 12, 10:57 AM