> Date: Thu, 1 Oct 2026 22:54:19 +0200 > From: Patrice Dumas <[email protected]> > > Hello, > > In the new mingw based on MSYS2 CI platform setup by Bruno, the C build > is stopped by TEXT being a macro, with an error that is explicit with > clang, > ../../../tta/C/convert/converter.h:189:9: error: type specifier missing, > defaults to 'int'; ISO C99 and later do not support implicit int > [-Wimplicit-int] > 189 | TEXT (*convert_tree)(CONVERTER *self, const ELEMENT *tree), > | > | int > D:/a/_temp/msys64/clang64/include/winnt.h:415:28: note: expanded from macro > 'TEXT' > 415 | #define TEXT(quote) __TEXT(quote) > | ^ > D:/a/_temp/msys64/clang64/include/winnt.h:412:23: note: expanded from macro > '__TEXT' > 412 | #define __TEXT(quote) quote > | ^ > > the macro being documented here: > https://learn.microsoft.com/en-us/windows/win32/api/winnt/nf-winnt-text > > In texi2any TEXT is "typedef struct TEXT" for the accumulated text with > length used everywhere (from tta/C/main/text.{c,h}). > > > Any idea how to handle such a case? Decide that TEXT is too generic? > define the macro to something else of undef the macro?
The best alternative is to use a different name for the texi2any macro, not TEXT but something less common, like TEXT_AND_LENGTH or somesuch. Undefining a macro defined by a system header runs the risk of causing trouble, and should only be done if there are no better alternatives (like when you really want to change what that macro does).
