XyrisOS / xyris

The Xyris Kernel
https://xyr.is
MIT License
153 stars 11 forks source link

Resolve "Use C++ Attribute Specifiers When Possible" #338

Closed Kfeavel closed 2 years ago

Kfeavel commented 2 years ago

Resolves #335

Kfeavel commented 2 years ago

This needs tested before merging. I haven't gotten my MacBook Pro to the point where it can compile a bootable image without Docker.

micahswitzer commented 2 years ago

Why remove the #defines when you could just replace the __attribute__ syntax with the [[attribute]] syntax? I think what you have is worse than what it's replacing.

Kfeavel commented 2 years ago

I prefer the C++ style [[attribute]] over __attribute__ primarily because it's a lot shorter. Plus, we can't just replace the macros with [[attribute]] since that doesn't work for functions with C linkage.