[0/3] libc: Comply with the libstdc++ test case names.cc

Message ID 20201001141753.6657-1-torbjorn.svensson@st.com
Headers show
Series
  • libc: Comply with the libstdc++ test case names.cc
Related show

Message

Torbjorn SVENSSON via Newlib Oct. 1, 2020, 2:17 p.m.
As discussed in GCC bug 97088
(https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97088), parameters in
prototypes of library functions should use reserved names, or no name
at all.
It's somewhat unclear how to handle members in structs, but as the
__tzrule_struct is an internal newlib struct, I don't see any point
in not trying to comply here too.


Without the patches, you will get errors like:
In file included from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/ctime:42,
                 from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/arm-none-eabi/bits/stdc++.h:49,
                 from /work/src/gcc/libstdc++-v3/testsuite/17_intro/names.cc:199:
/work/install-native/arm-none-eabi/include/time.h:110: error: expected unqualified-id before ';' token
/work/install-native/arm-none-eabi/include/time.h:110: error: expected ')' before ';' token
/work/src/gcc/libstdc++-v3/testsuite/17_intro/names.cc:55: note: to match this '('
In file included from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/cwchar:44,
                 from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/arm-none-eabi/bits/stdc++.h:50,
                 from /work/src/gcc/libstdc++-v3/testsuite/17_intro/names.cc:199:
/work/install-native/arm-none-eabi/include/wchar.h:251: error: expected ')' before ';' token
/work/install-native/arm-none-eabi/include/wchar.h:252: error: expected ')' before ';' token
In file included from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/cinttypes:46,
                 from /work/build-native/gcc-final/arm-none-eabi/thumb/v6-m/nofp/libstdc++-v3/include/arm-none-eabi/bits/stdc++.h:56,
                 from /work/src/gcc/libstdc++-v3/testsuite/17_intro/names.cc:199:
/work/install-native/arm-none-eabi/include/inttypes.h:323: error: expected ')' before ';' token


I'd need someone to help me push the patches since I have no commit
access.

Torbjörn SVENSSON (3):
  libc/include/inttypes.h: Remove parameter name
  libc/include/wchar.h: Remove parameter name
  libc: Replace one letter member names in __tzrule_struct

 newlib/libc/include/inttypes.h   |  2 +-
 newlib/libc/include/time.h       |  8 ++++----
 newlib/libc/include/wchar.h      |  4 ++--
 newlib/libc/time/tzcalc_limits.c | 14 +++++++-------
 newlib/libc/time/tzset_r.c       | 22 +++++++++++-----------
 5 files changed, 25 insertions(+), 25 deletions(-)

-- 
2.18.0