Messages in this thread | | | Date | Fri, 4 Aug 2023 11:36:15 +0200 | Subject | Re: [PATCH v1 3/4] lib/vsprintf: Remove implied inclusions | From | Rasmus Villemoes <> |
| |
On 04/08/2023 10.26, Andy Shevchenko wrote: > Remove inclusions that are implied and guaranteed to be provided by others: > > compiler.h by types.h > string.hi by string_helpers.h
What? No. That's not what we want. Each .c and each .h file should include the headers that declare the stuff they're using. So if string_helpers.h magically stops referring to anything from string.h, one should be allowed to stop including string.h from string_helpers.h.
Sure, those two may forever be so intertwined that it never happens, but one really can't maintain some matrix of "X always includes Y so if you include X you don't have to include Y" in one's head.
Rasmus
| |