[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH] Config.mk: drop -Wdeclaration-after-statement
Hi Jan, On 30/11/2023 08:36, Jan Beulich wrote: On 29.11.2023 14:10, Anthony PERARD wrote:On Wed, Nov 29, 2023 at 11:47:24AM +0100, Julien Grall wrote:+ Anthony for the tools + Juergen for Xenstored On 29/11/2023 11:34, Alexander Kanavin wrote:On 11/29/23 08:51, Jan Beulich wrote:On 28.11.2023 18:47, Alexander Kanavin wrote:Such constructs are fully allowed by C99: https://gcc.gnu.org/onlinedocs/gcc-12.2.0/gcc/Mixed-Labels-and-Declarations.html#Mixed-Labels-and-DeclarationsThere's more to this: It may also be a policy of ours (or of any sub-component) to demand that declarations and statements are properly separated. This would therefore need discussing first.The error is coming from python 3.12 headers and not from anything in xen tree, no? As you don't have control over those headers, I'm not sure what other solution there could be.We seem to add -Wno-declaration-after-statement for some components in tools/. So one possibility would be to move the flags to an hypervisor specific makefile (in xen/).You mean xen/Makefile I hope.Anthony/Juergen, do you have any concern if the tools are built without -Wdeclaration-after-statement?I don't, and as you said, there's already quite a few -Wno-declaration-after-statement. It can be nice to add a new variable in the middle of a function, it's like creating a new scope without adding extra indentation (if we wanted a new scope, we would need {} thus the intend).To be clear, I wouldn't mind this in the hypervisor either. But then I also don't see why we should further request people to separate declarations from statements in an easily noticeable way. Thing is that imo something like this wants spelling out in ./CODING_STYLE. So I agree that if we were to remove -Wdeclaration-after-statement then we should also update the CODING_STYLE. However, I am not entirely sure I would want to mix code and declaration in the hypervisor. Anyway, I think this is a separate discussion from resolving the immediate problem (i.e. building the python bindings). So for now, I think it would make sense to push the -Wdeclaration-after-statement to the tools. @Alexander, are you going to send a new version? If not, I would be happy to do it. Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |