On Mon, Jun 10, 2019 at 05:20:31PM +0100, Jozef Lawrynowicz wrote: > On Thu, 6 Jun 2019 10:09:32 +0200 > Richard Biener <richard.guent...@gmail.com> wrote: > > > On Wed, Jun 5, 2019 at 3:26 PM Jozef Lawrynowicz <jozefl....@gmail.com> > > wrote: > > > > > > I would appreciate if anyone can help me decide if: > > > - It would be OK for the use of builtin macros such as __SIZE_TYPE__ to > > > somehow > > > not trigger the "pedantic errors", and what a valid approach might look > > > like > > > > I think that would be OK - note you could also modify your target board. > > I'm now realising that the most straightforward way to fix this issue will be > to just modify the configuration of the DejaGNU target board, so that > DEFAULT_CFLAGS is set there and declarations of DEFAULT_CFLAGS in the > testsuite > that would set -pedantic-errors are never used.
That is not a fix, that is sweeping the problem under the rug. As a somewhat dirty hack I added #if __MSP430X_LARGE__ #undef __SIZE_TYPE__ __extension__ typedef unsigned __int20 __SIZE_TYPE__; #endif to the start of the installed stddef.h, and that fixes the problem fine, for correct programs that do not forget to include <stddef.h> (directly or indirectly), anyway. Segher