-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Disable -Wimplicit-fallthrough
warning for Modules/expat
#125506
Comments
In fact, We can add |
I think that we should not add anything here, because we are working with a vendored module that cannot be modified (without a very strong reason to).
Again, developers should not touch vendored libs without a very strong reason. Fixing such a warning is not good enough reason to do so. |
I'm in agreement that we shouldn't be warning on code we don't control. Our current setup for warning tooling applies the warning to all code covered by |
We don't have such functionality in PoC hackdiff --git a/Makefile.pre.in b/Makefile.pre.in
index 07c8a4d2014..fa9faad0c9b 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1351,7 +1351,7 @@ $(LIBMPDEC_A): $(LIBMPDEC_OBJS)
##########################################################################
# Build static libexpat.a
-LIBEXPAT_CFLAGS=@LIBEXPAT_CFLAGS@ $(PY_STDMODULE_CFLAGS) $(CCSHARED)
+LIBEXPAT_CFLAGS=@LIBEXPAT_CFLAGS@ $(PY_STDMODULE_CFLAGS) -Wno-implicit-fallthrough $(CCSHARED)
Modules/expat/xmlparse.o: $(srcdir)/Modules/expat/xmlparse.c $(LIBEXPAT_HEADERS) $(PYTHON_HEADERS)
$(CC) -c $(LIBEXPAT_CFLAGS) -o $@ $(srcdir)/Modules/expat/xmlparse.c Footnotes
|
Bug report
Right now compilers produce a lot of warnings for vendored modules:
But, there's not much we can do about them, since they are vendored. For example,
siphash
has explicit fall-through comments:cpython/Modules/expat/siphash.h
Lines 235 to 243 in 92af191
But, it is still reported:
My opinion is that we only should show actionable warnings, that we can actually fix.
CC @hugovk
The text was updated successfully, but these errors were encountered: