diff --git a/src/Makefile.am b/src/Makefile.am
index a26e7a951e0ec041aecf3abd7bf00f3ebc4de4b5..2a6fed484842c507d5bace3d982118c775fab7a4 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -66,7 +66,7 @@ EXTRA_DIST = \
 	$(BUILT_SOURCES)
 
 # The -I. is for <FlexLexer.h>
-dynare_preprocessor_CPPFLAGS = $(BOOST_CPPFLAGS) -I.
+dynare_preprocessor_CPPFLAGS = $(BOOST_CPPFLAGS) -I. -Wno-unused-private-field
 dynare_preprocessor_LDFLAGS = $(AM_LDFLAGS) $(BOOST_LDFLAGS)
 # -lpthread is no longer necessary for glibc ⩾ 2.34 (i.e. Debian “bookworm” 12)
 dynare_preprocessor_LDADD = macro/libmacro.a -lpthread