Does anyone still feel strongly about -Wdeclaration-after-statement ?

Peter Harris pharris2 at rocketsoftware.com
Tue Aug 13 13:38:19 UTC 2024


> Using __attribute__((cleanup)) plus a bit macro magic gives us a little taste of
> golang's defer.
>
> Is there any strong reason for not using it ?

Not all compilers support __attribute__((cleanup)). I don't know if anybody still uses Sun Studio or IBM's XLC, but I still use MSVC to build.

I, for one, am keeping a close eye on https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3199.htm , but it missed C23, so it will be years before it is standardized, and even more unfortunate years before all of the relevant compiler vendors implement it.

Peter Harris
================================
Rocket Software, Inc. and subsidiaries ■ 77 Fourth Avenue, Waltham MA 02451 ■ Main Office Toll Free Number: +1 855.577.4323
Contact Customer Support: https://my.rocketsoftware.com/RocketCommunity/RCEmailSupport
Unsubscribe from Marketing Messages/Manage Your Subscription Preferences - http://www.rocketsoftware.com/manage-your-email-preferences
Privacy Policy - http://www.rocketsoftware.com/company/legal/privacy-policy
================================

This communication and any attachments may contain confidential information of Rocket Software, Inc. All unauthorized use, disclosure or distribution is prohibited. If you are not the intended recipient, please notify Rocket Software immediately and destroy all copies of this communication. Thank you.


More information about the xorg-devel mailing list