Re: [PATCH 3/8] riscv: init: merge split string literals in preprocessor directive
From: Paul Walmsley
Date: Fri Oct 18 2019 - 02:08:30 EST
On Fri, 18 Oct 2019, Luc Van Oostenryck wrote:
> I quickly checked and gcc also complain about the second line:
> $ cat y.c
> #ifndef __riscv_cmodel_medany
> #error "setup_vm() is called from head.S before relocate so it should "
> "not use absolute addressing."
> #endif
>
> $ gcc -c y.c
> y.c:2:2: error: #error "setup_vm() is called from head.S before relocate so it should "
> #error "setup_vm() is called from head.S before relocate so it should "
> ^~~~~
> y.c:3:8: error: expected identifier or '(' before string constant
> "not use absolute addressing."
> ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> So it seems that gcc doesn't join these lines.
I guess that's what I get for assuming that the original code was tested.
Thanks for doing that, and sorry for the noise.
> Fell free to add my:
> Reviewed-by: Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx>
Done.
- Paul