Message ID | 20230328-nolibc-c99-v2-0-c989f2289222@weissschuh.net (mailing list archive) |
---|---|
Headers | show |
Series | tools/nolibc: -std=c89 compatibility | expand |
Hi Thomas, On Thu, Apr 06, 2023 at 09:54:46PM +0000, Thomas Weißschuh wrote: > This series replaces the C99 compatibility patch. (See v1 link below). > After the discussion about support C99 and/or GNU89 I came to the > conclusion supporting straight C89 is not very hard. > > Instead of validating both C99 and GNU89 in some awkward way only for > somebody requesting true C89 support let's just do it this way. > > Feel free to squash all the comment syntax patches together if you > prefer. I gave it some thought, at first considering that going lower than GNU89 was possibly not very useful, but given that the changes are very small in the end (mostly comments formating), I think that you're right. The cost of reaching this level of portability is basically zero once the patch is applied so I think it's worth doing it now. However I think I will indeed squash all the comments patch together as you suggest. Thank you! Willy
Hi Thomas, On Sun, Apr 09, 2023 at 11:28:46AM +0200, Willy Tarreau wrote: > Hi Thomas, > > On Thu, Apr 06, 2023 at 09:54:46PM +0000, Thomas Weißschuh wrote: > > This series replaces the C99 compatibility patch. (See v1 link below). > > After the discussion about support C99 and/or GNU89 I came to the > > conclusion supporting straight C89 is not very hard. > > > > Instead of validating both C99 and GNU89 in some awkward way only for > > somebody requesting true C89 support let's just do it this way. > > > > Feel free to squash all the comment syntax patches together if you > > prefer. > > I gave it some thought, at first considering that going lower than GNU89 > was possibly not very useful, but given that the changes are very small > in the end (mostly comments formating), I think that you're right. The > cost of reaching this level of portability is basically zero once the > patch is applied so I think it's worth doing it now. However I think I > will indeed squash all the comments patch together as you suggest. I've now squashed the ones about comments together, fixed the declaration inside the for statement in nolibc-test and tested with gcc 4.7 & 4.8 and confirmed it works as expected. I've queued it there for now: https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git/log/?h=20230415-nolibc-updates-4a Thank you! Willy
On 2023-04-15 16:47:03+0200, Willy Tarreau wrote: > On Sun, Apr 09, 2023 at 11:28:46AM +0200, Willy Tarreau wrote: > > On Thu, Apr 06, 2023 at 09:54:46PM +0000, Thomas Weißschuh wrote: > > > This series replaces the C99 compatibility patch. (See v1 link below). > > > After the discussion about support C99 and/or GNU89 I came to the > > > conclusion supporting straight C89 is not very hard. > > > > > > Instead of validating both C99 and GNU89 in some awkward way only for > > > somebody requesting true C89 support let's just do it this way. > > > > > > Feel free to squash all the comment syntax patches together if you > > > prefer. > > > > I gave it some thought, at first considering that going lower than GNU89 > > was possibly not very useful, but given that the changes are very small > > in the end (mostly comments formating), I think that you're right. The > > cost of reaching this level of portability is basically zero once the > > patch is applied so I think it's worth doing it now. However I think I > > will indeed squash all the comments patch together as you suggest. > > I've now squashed the ones about comments together, fixed the declaration > inside the for statement in nolibc-test and tested with gcc 4.7 & 4.8 and > confirmed it works as expected. I've queued it there for now: > > https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git/log/?h=20230415-nolibc-updates-4a Thanks! I noticed today that I did not adapt the comments in arch-s390.h; because the start() comments were already correct. But the last line of arch-s390.h still contains a C99 comment. Do you want me to send a patch or could you just push one? (Or fold it into my patch) Thanks, Thomas
On Sat, Apr 15, 2023 at 05:15:27PM +0200, Thomas Weißschuh wrote: > On 2023-04-15 16:47:03+0200, Willy Tarreau wrote: > > On Sun, Apr 09, 2023 at 11:28:46AM +0200, Willy Tarreau wrote: > > > On Thu, Apr 06, 2023 at 09:54:46PM +0000, Thomas Weißschuh wrote: > > > > This series replaces the C99 compatibility patch. (See v1 link below). > > > > After the discussion about support C99 and/or GNU89 I came to the > > > > conclusion supporting straight C89 is not very hard. > > > > > > > > Instead of validating both C99 and GNU89 in some awkward way only for > > > > somebody requesting true C89 support let's just do it this way. > > > > > > > > Feel free to squash all the comment syntax patches together if you > > > > prefer. > > > > > > I gave it some thought, at first considering that going lower than GNU89 > > > was possibly not very useful, but given that the changes are very small > > > in the end (mostly comments formating), I think that you're right. The > > > cost of reaching this level of portability is basically zero once the > > > patch is applied so I think it's worth doing it now. However I think I > > > will indeed squash all the comments patch together as you suggest. > > > > I've now squashed the ones about comments together, fixed the declaration > > inside the for statement in nolibc-test and tested with gcc 4.7 & 4.8 and > > confirmed it works as expected. I've queued it there for now: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/wtarreau/nolibc.git/log/?h=20230415-nolibc-updates-4a > > Thanks! > > I noticed today that I did not adapt the comments in arch-s390.h; > because the start() comments were already correct. > > But the last line of arch-s390.h still contains a C99 comment. ah, I must have missed it because I checked using git grep //. > Do you want me to send a patch or could you just push one? > (Or fold it into my patch) I'll do it and force-push. Thanks for checking and notifying me! Cheers, Willy
This series replaces the C99 compatibility patch. (See v1 link below). After the discussion about support C99 and/or GNU89 I came to the conclusion supporting straight C89 is not very hard. Instead of validating both C99 and GNU89 in some awkward way only for somebody requesting true C89 support let's just do it this way. Feel free to squash all the comment syntax patches together if you prefer. All changes in this series are cosmetic only. To: Willy Tarreau <w@1wt.eu> To: Shuah Khan <shuah@kernel.org> Cc: linux-kernel@vger.kernel.org Cc: linux-kselftest@vger.kernel.org Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> This series is based on the "dev" branch of the RCU tree. --- Changes in v2: - Target C89 instead of C99 - Link to v1: https://lore.kernel.org/r/20230328-nolibc-c99-v1-1-a8302fb19f19@weissschuh.net --- Thomas Weißschuh (11): tools/nolibc: use standard __asm__ statements tools/nolibc: use __inline__ syntax tools/nolibc: i386: use C89 comment syntax tools/nolibc: x86_64: use C89 comment syntax tools/nolibc: riscv: use C89 comment syntax tools/nolibc: aarch64: use C89 comment syntax tools/nolibc: arm: use C89 comment syntax tools/nolibc: mips: use C89 comment syntax tools/nolibc: loongarch: use C89 comment syntax tools/nolibc: use C89 comment syntax tools/nolibc: validate C89 compatibility tools/include/nolibc/arch-aarch64.h | 32 ++++++++-------- tools/include/nolibc/arch-arm.h | 42 ++++++++++----------- tools/include/nolibc/arch-i386.h | 40 ++++++++++---------- tools/include/nolibc/arch-loongarch.h | 38 +++++++++---------- tools/include/nolibc/arch-mips.h | 56 ++++++++++++++-------------- tools/include/nolibc/arch-riscv.h | 40 ++++++++++---------- tools/include/nolibc/arch-x86_64.h | 34 ++++++++--------- tools/include/nolibc/stackprotector.h | 4 +- tools/include/nolibc/stdlib.h | 18 ++++----- tools/include/nolibc/string.h | 4 +- tools/include/nolibc/sys.h | 8 ++-- tools/testing/selftests/nolibc/Makefile | 2 +- tools/testing/selftests/nolibc/nolibc-test.c | 14 +++---- 13 files changed, 166 insertions(+), 166 deletions(-) --- base-commit: bd5b341f0f69eb4c958ffd48699213c5b9af8145 change-id: 20230328-nolibc-c99-59f44ea45636 Best regards,