Page MenuHomeFreeBSD

libc: Parenthesise qualifier-preserving function definitions
ClosedPublic

Authored by kfv on Fri, Sep 11, 9:40 PM.
Tags
None
Referenced Files
F172589694: D59600.id186593.diff
Sat, Sep 19, 12:30 PM
F172561227: D59600.id186489.diff
Sat, Sep 19, 6:56 AM
F172507497: D59600.id.diff
Fri, Sep 18, 10:33 PM
F172497918: D59600.id186489.diff
Fri, Sep 18, 9:10 PM
F172496288: D59600.id186593.diff
Fri, Sep 18, 8:56 PM
Unknown Object (File)
Fri, Sep 18, 8:08 AM
Unknown Object (File)
Thu, Sep 17, 9:10 PM
Unknown Object (File)
Wed, Sep 16, 6:39 PM
Subscribers

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