On 5 October 2018 at 17:09, Laurent Vivier <laur...@vivier.eu> wrote: > On 05/10/2018 17:25, Richard Henderson wrote: >> On 10/5/18 4:10 AM, Peter Maydell wrote: >>> On 5 October 2018 at 01:28, Laurent Vivier <laur...@vivier.eu> wrote: >>>> I have the following error when building on Fedora 28 and gcc (GCC) >>>> 8.1.1 20180712 (Red Hat 8.1.1-5) >>>> >>>> CC aarch64_be-linux-user/target/arm/arm-semi.o >>>> .../target/arm/arm-semi.c: In function ‘do_arm_semihosting’: >>>> .../target/arm/arm-semi.c:270:1: error: unknown option after ‘#pragma >>>> GCC diagnostic’ kind [-Werror=pragmas] >>>> >>>> Perhaps you should use a "#if defined(__clang__)" to apply your fix only >>>> to clang? >>> >>> I did test on gcc, but not that version. The point of the >>> _Pragma("GCC diagnostic ignored \"-Wpragmas\""); >>> line is to suppress that error (which it does on my gcc 5) >>> so I don't know why your gcc is complaining :-( >> >> I suppose you could try -Wunknown-pragmas. >> But from reading the manual it shouldn't make a difference. >> OTOH, what you wrote should have worked... > > Could it be a bug in _Pragma()?
I got an f28 VM and can repro this. It looks like the problem only happens when the get_user/put_user stuff is used via some other macro, for some reason -- so the GET_ARG and SET_ARG macros in arm-semi.c and the NEW_AUX_ENT macro in elfload.c cause problems, but less indirect use does not. I'll try to trim this down to a smaller test case somehow... thanks -- PMM