Page MenuHomeFreeBSD

cdefs.h: Remove pre gcc 5.0 support
ClosedPublic

Authored by imp on Thu, Jun 20, 6:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 22, 5:54 AM
Unknown Object (File)
Fri, Jun 21, 6:08 PM
Unknown Object (File)
Fri, Jun 21, 6:06 PM
Unknown Object (File)
Thu, Jun 20, 2:18 PM
Unknown Object (File)
Thu, Jun 20, 7:43 AM
Unknown Object (File)
Thu, Jun 20, 6:19 AM
Subscribers

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Thu, Jun 20, 6:16 AM
imp created this revision.
brooks added a subscriber: brooks.
brooks added inline comments.
sys/sys/cdefs.h
235–237

Its this still relevant?

311–313

This is one case where I might consider an if,define,else,error,endif as this is used as a correctness assert and falling through could lead to a security vulnerability.

This revision is now accepted and ready to land.Thu, Jun 20, 5:00 PM
sys/sys/cdefs.h
235–237

I noticed this and fixed it separately. I've not posted a review for it yet.

311–313

Can't do the #error here, can't embed it in a marco expansion.
However, if there's no __builtin_unreachable, we'll get an error where it's used, which is what we want. It's not needed for any .h file in the system except kassert.h where it's a macro used by C code (which has to have a supported compiler) or nvmf_tcp.h which technically has inlines, but won't be used by anybody wanting to use another compiler to build anything except the in-tree code, which needs a supported compiler.
So this gives the same 'won't compile' feature that you want at use point that you're requesting already.

sys/sys/cdefs.h
311–313

makes sense

This revision was automatically updated to reflect the committed changes.