[PROPOSED 1/4] More updates to GCC_DEBUG_FLAGS for GCC 14
* Makefile (GCC_DEBUG_FLAGS): Omit -fno-common, as it is now the default. Omit -Wuninitialized as it’s implied by -Wall. Omit -Wno-address and -Wno-type-limits as they don’t seem to be needed with GCC 14. --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 6b093013..4d2ac1cf 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ -Wall -Wextra \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \ @@ -332,10 +332,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # If your system has a "GMT offset" field in its "struct tm"s # (or if you decide to add such a field in your system's "time.h" file), -- 2.43.0
C23’s [[reproducible]] and [[unsequenced]] are weaker than GCC’s __attribute__((pure)) and __attribute__((const) respectively, so rework the code so that it doesn’t imply they’re equivalent. * private.h (ATTRIBUTE_REPRODUCIBLE, ATTRIBUTE_UNSEQUENCED): Use only the C23 attributes, if available. All uses changed to ... (ATTRIBUTE_CONST, ATTRIBUTE_PURE): ... these new macros. --- localtime.c | 4 ++-- private.h | 41 ++++++++++++++++++++--------------------- zdump.c | 6 +++--- zic.c | 18 +++++++++--------- 4 files changed, 34 insertions(+), 35 deletions(-) diff --git a/localtime.c b/localtime.c index 10ed4d7a..52d5ee01 100644 --- a/localtime.c +++ b/localtime.c @@ -750,7 +750,7 @@ is_digit(char c) ** Return a pointer to that character. */ -ATTRIBUTE_REPRODUCIBLE static const char * +ATTRIBUTE_PURE static const char * getzname(register const char *strp) { register char c; @@ -771,7 +771,7 @@ getzname(register const char *strp) ** We don't do any checking here; checking is done later in common-case code. */ -ATTRIBUTE_REPRODUCIBLE static const char * +ATTRIBUTE_PURE static const char * getqzname(register const char *strp, const int delim) { register int c; diff --git a/private.h b/private.h index 67061fbb..9aec6fc2 100644 --- a/private.h +++ b/private.h @@ -481,14 +481,6 @@ typedef unsigned long uintmax_t; # define ckd_mul(r, a, b) __builtin_mul_overflow(a, b, r) #endif -#if 3 <= __GNUC__ -# define ATTRIBUTE_MALLOC __attribute__((malloc)) -# define ATTRIBUTE_FORMAT(spec) __attribute__((format spec)) -#else -# define ATTRIBUTE_MALLOC /* empty */ -# define ATTRIBUTE_FORMAT(spec) /* empty */ -#endif - #if (defined __has_c_attribute \ && (202311 <= __STDC_VERSION__ || !defined __STRICT_ANSI__)) # define HAVE___HAS_C_ATTRIBUTE true @@ -556,11 +548,7 @@ typedef unsigned long uintmax_t; # endif #endif #ifndef ATTRIBUTE_REPRODUCIBLE -# if 3 <= __GNUC__ -# define ATTRIBUTE_REPRODUCIBLE __attribute__((pure)) -# else -# define ATTRIBUTE_REPRODUCIBLE /* empty */ -# endif +# define ATTRIBUTE_REPRODUCIBLE /* empty */ #endif #if HAVE___HAS_C_ATTRIBUTE @@ -569,11 +557,22 @@ typedef unsigned long uintmax_t; # endif #endif #ifndef ATTRIBUTE_UNSEQUENCED -# if 3 <= __GNUC__ -# define ATTRIBUTE_UNSEQUENCED __attribute__((const)) -# else -# define ATTRIBUTE_UNSEQUENCED /* empty */ -# endif +# define ATTRIBUTE_UNSEQUENCED /* empty */ +#endif + +/* __attribute__((const)) is stricter than [[unsequenced]] and + __attribute__((pure)) is stricter than [[reproducible]], + so the latter are adequate substitutes in non-GCC C23 platforms. */ +#if __GNUC__ < 3 +# define ATTRIBUTE_CONST ATTRIBUTE_UNSEQUENCED +# define ATTRIBUTE_FORMAT(spec) /* empty */ +# define ATTRIBUTE_MALLOC /* empty */ +# define ATTRIBUTE_PURE ATTRIBUTE_REPRODUCIBLE +#else +# define ATTRIBUTE_CONST __attribute__((const)) +# define ATTRIBUTE_FORMAT(spec) __attribute__((format spec)) +# define ATTRIBUTE_MALLOC __attribute__((malloc)) +# define ATTRIBUTE_PURE __attribute__((pure)) #endif #if (__STDC_VERSION__ < 199901 && !defined restrict \ @@ -707,7 +706,7 @@ DEPRECATED_IN_C23 char *ctime(time_t const *); char *asctime_r(struct tm const *restrict, char *restrict); char *ctime_r(time_t const *, char *); #endif -ATTRIBUTE_UNSEQUENCED double difftime(time_t, time_t); +ATTRIBUTE_CONST double difftime(time_t, time_t); size_t strftime(char *restrict, size_t, char const *restrict, struct tm const *restrict); # if HAVE_STRFTIME_L @@ -823,10 +822,10 @@ timezone_t tzalloc(char const *); void tzfree(timezone_t); # if STD_INSPIRED # if TZ_TIME_T || !defined posix2time_z -ATTRIBUTE_REPRODUCIBLE time_t posix2time_z(timezone_t, time_t); +ATTRIBUTE_PURE time_t posix2time_z(timezone_t, time_t); # endif # if TZ_TIME_T || !defined time2posix_z -ATTRIBUTE_REPRODUCIBLE time_t time2posix_z(timezone_t, time_t); +ATTRIBUTE_PURE time_t time2posix_z(timezone_t, time_t); # endif # endif #endif diff --git a/zdump.c b/zdump.c index 7d99cc74..edc4d666 100644 --- a/zdump.c +++ b/zdump.c @@ -89,7 +89,7 @@ static bool warned; static bool errout; static char const *abbr(struct tm const *); -ATTRIBUTE_REPRODUCIBLE static intmax_t delta(struct tm *, struct tm *); +ATTRIBUTE_PURE static intmax_t delta(struct tm *, struct tm *); static void dumptime(struct tm const *); static time_t hunt(timezone_t, time_t, time_t, bool); static void show(timezone_t, char *, time_t, bool); @@ -97,7 +97,7 @@ static void showextrema(timezone_t, char *, time_t, struct tm *, time_t); static void showtrans(char const *, struct tm const *, time_t, char const *, char const *); static const char *tformat(void); -ATTRIBUTE_REPRODUCIBLE static time_t yeartot(intmax_t); +ATTRIBUTE_PURE static time_t yeartot(intmax_t); /* Is C an ASCII digit? */ static bool @@ -134,7 +134,7 @@ size_overflow(void) /* Return A + B, exiting if the result would overflow either ptrdiff_t or size_t. A and B are both nonnegative. */ -ATTRIBUTE_REPRODUCIBLE static ptrdiff_t +ATTRIBUTE_PURE static ptrdiff_t sumsize(ptrdiff_t a, ptrdiff_t b) { #ifdef ckd_add diff --git a/zic.c b/zic.c index 28f7f9eb..36739cb0 100644 --- a/zic.c +++ b/zic.c @@ -470,7 +470,7 @@ size_overflow(void) memory_exhausted(_("size overflow")); } -ATTRIBUTE_REPRODUCIBLE static ptrdiff_t +ATTRIBUTE_PURE static ptrdiff_t size_sum(size_t a, size_t b) { #ifdef ckd_add @@ -484,7 +484,7 @@ size_sum(size_t a, size_t b) size_overflow(); } -ATTRIBUTE_REPRODUCIBLE static ptrdiff_t +ATTRIBUTE_PURE static ptrdiff_t size_product(ptrdiff_t nitems, ptrdiff_t itemsize) { #ifdef ckd_mul @@ -499,7 +499,7 @@ size_product(ptrdiff_t nitems, ptrdiff_t itemsize) size_overflow(); } -ATTRIBUTE_REPRODUCIBLE static ptrdiff_t +ATTRIBUTE_PURE static ptrdiff_t align_to(ptrdiff_t size, ptrdiff_t alignment) { ptrdiff_t lo_bits = alignment - 1, sum = size_sum(size, lo_bits); @@ -1435,7 +1435,7 @@ relname(char const *target, char const *linkname) /* Return true if A and B must have the same parent dir if A and B exist. Return false if this is not necessarily true (though it might be true). Keep it simple, and do not inspect the file system. */ -static bool +ATTRIBUTE_PURE static bool same_parent_dirs(char const *a, char const *b) { for (; *a == *b; a++, b++) @@ -3627,7 +3627,7 @@ lowerit(char a) } /* case-insensitive equality */ -ATTRIBUTE_REPRODUCIBLE static bool +ATTRIBUTE_PURE static bool ciequal(register const char *ap, register const char *bp) { while (lowerit(*ap) == lowerit(*bp++)) @@ -3636,7 +3636,7 @@ ciequal(register const char *ap, register const char *bp) return false; } -ATTRIBUTE_REPRODUCIBLE static bool +ATTRIBUTE_PURE static bool itsabbr(register const char *abbr, register const char *word) { if (lowerit(*abbr) != lowerit(*word)) @@ -3652,7 +3652,7 @@ itsabbr(register const char *abbr, register const char *word) /* Return true if ABBR is an initial prefix of WORD, ignoring ASCII case. */ -ATTRIBUTE_REPRODUCIBLE static bool +ATTRIBUTE_PURE static bool ciprefix(char const *abbr, char const *word) { do @@ -3762,7 +3762,7 @@ time_overflow(void) exit(EXIT_FAILURE); } -ATTRIBUTE_REPRODUCIBLE static zic_t +ATTRIBUTE_PURE static zic_t oadd(zic_t t1, zic_t t2) { #ifdef ckd_add @@ -3776,7 +3776,7 @@ oadd(zic_t t1, zic_t t2) time_overflow(); } -ATTRIBUTE_REPRODUCIBLE static zic_t +ATTRIBUTE_PURE static zic_t tadd(zic_t t1, zic_t t2) { #ifdef ckd_add -- 2.43.0
This is mostly to simplify the code. It also fixes a difftime gotcha that does not affect TZDB proper. * zdump.c (delta, xstrsize, xmalloc, my_snprintf): * zic.c (emalloc, estrdup): Remove function attributes, as GCC no longer generates a false positive if these attributes are absent. (In general GCC should not need to warn about static functions lacking attributes.) * private.h (ATTRIBUTE_UNSEQUENCED, ATTRIBUTE_CONST, ATTRIBUTE_MALLOC): Remove; no longer used. (difftime): ATTRIBUTE_PURE, not ATTRIBUTE_CONST, since its observable behavior can depend on floating-point environment. This change does not fix a tzcode bug, as tzcode never calls difftime. However, it could fix a bug elsewhere, if code is taken from private.h and used elsewhere. --- private.h | 19 +++---------------- zdump.c | 8 ++++---- zic.c | 4 ++-- 3 files changed, 9 insertions(+), 22 deletions(-) diff --git a/private.h b/private.h index 9aec6fc2..cf2370c8 100644 --- a/private.h +++ b/private.h @@ -551,27 +551,14 @@ typedef unsigned long uintmax_t; # define ATTRIBUTE_REPRODUCIBLE /* empty */ #endif -#if HAVE___HAS_C_ATTRIBUTE -# if __has_c_attribute(unsequenced) -# define ATTRIBUTE_UNSEQUENCED [[unsequenced]] -# endif -#endif -#ifndef ATTRIBUTE_UNSEQUENCED -# define ATTRIBUTE_UNSEQUENCED /* empty */ -#endif - -/* __attribute__((const)) is stricter than [[unsequenced]] and +/* GCC attributes that are useful in tzcode. __attribute__((pure)) is stricter than [[reproducible]], - so the latter are adequate substitutes in non-GCC C23 platforms. */ + so the latter is an adequate substitute in non-GCC C23 platforms. */ #if __GNUC__ < 3 -# define ATTRIBUTE_CONST ATTRIBUTE_UNSEQUENCED # define ATTRIBUTE_FORMAT(spec) /* empty */ -# define ATTRIBUTE_MALLOC /* empty */ # define ATTRIBUTE_PURE ATTRIBUTE_REPRODUCIBLE #else -# define ATTRIBUTE_CONST __attribute__((const)) # define ATTRIBUTE_FORMAT(spec) __attribute__((format spec)) -# define ATTRIBUTE_MALLOC __attribute__((malloc)) # define ATTRIBUTE_PURE __attribute__((pure)) #endif @@ -706,7 +693,7 @@ DEPRECATED_IN_C23 char *ctime(time_t const *); char *asctime_r(struct tm const *restrict, char *restrict); char *ctime_r(time_t const *, char *); #endif -ATTRIBUTE_CONST double difftime(time_t, time_t); +ATTRIBUTE_PURE double difftime(time_t, time_t); size_t strftime(char *restrict, size_t, char const *restrict, struct tm const *restrict); # if HAVE_STRFTIME_L diff --git a/zdump.c b/zdump.c index edc4d666..86aceb45 100644 --- a/zdump.c +++ b/zdump.c @@ -89,7 +89,7 @@ static bool warned; static bool errout; static char const *abbr(struct tm const *); -ATTRIBUTE_PURE static intmax_t delta(struct tm *, struct tm *); +static intmax_t delta(struct tm *, struct tm *); static void dumptime(struct tm const *); static time_t hunt(timezone_t, time_t, time_t, bool); static void show(timezone_t, char *, time_t, bool); @@ -151,7 +151,7 @@ sumsize(ptrdiff_t a, ptrdiff_t b) /* Return the size of of the string STR, including its trailing NUL. Report an error and exit if this would exceed INDEX_MAX which means pointer subtraction wouldn't work. */ -static ptrdiff_t +ATTRIBUTE_PURE static ptrdiff_t xstrsize(char const *str) { size_t len = strlen(str); @@ -162,7 +162,7 @@ xstrsize(char const *str) /* Return a pointer to a newly allocated buffer of size SIZE, exiting on failure. SIZE should be positive. */ -ATTRIBUTE_MALLOC static void * +static void * xmalloc(ptrdiff_t size) { void *p = malloc(size); @@ -932,7 +932,7 @@ showextrema(timezone_t tz, char *zone, time_t lo, struct tm *lotmp, time_t hi) # include <stdarg.h> /* A substitute for snprintf that is good enough for zdump. */ -ATTRIBUTE_FORMAT((printf, 3, 4)) static int +static int my_snprintf(char *s, size_t size, char const *format, ...) { int n; diff --git a/zic.c b/zic.c index 36739cb0..19a0b953 100644 --- a/zic.c +++ b/zic.c @@ -523,7 +523,7 @@ memcheck(void *ptr) return ptr; } -ATTRIBUTE_MALLOC static void * +static void * emalloc(size_t size) { return memcheck(malloc(size)); @@ -535,7 +535,7 @@ erealloc(void *ptr, size_t size) return memcheck(realloc(ptr, size)); } -ATTRIBUTE_MALLOC static char * +static char * estrdup(char const *str) { return memcheck(strdup(str)); -- 2.43.0
Document better how we work around GCC bug 114833, a false-positive compiler diagnostic, when debugging. * private.h (ATTRIBUTE_PURE_114833): New macro. * localtime.c (getzname, getqzname): * zdump.c (yeartot, sumsize), zic.c (size_sum, size_product, align_to) (same_parent_dirs, ciequal, itsabbr, ciprefix, oadd, tadd): Now ATTRIBUTE_PURE_114833, not ATTRIBUTE_PURE. * zdump.c (xstrsize): No longer needs ATTRIBUTE_PURE. --- localtime.c | 4 ++-- private.h | 9 +++++++++ zdump.c | 6 +++--- zic.c | 18 +++++++++--------- 4 files changed, 23 insertions(+), 14 deletions(-) diff --git a/localtime.c b/localtime.c index 52d5ee01..c9f0d1a8 100644 --- a/localtime.c +++ b/localtime.c @@ -750,7 +750,7 @@ is_digit(char c) ** Return a pointer to that character. */ -ATTRIBUTE_PURE static const char * +ATTRIBUTE_PURE_114833 static const char * getzname(register const char *strp) { register char c; @@ -771,7 +771,7 @@ getzname(register const char *strp) ** We don't do any checking here; checking is done later in common-case code. */ -ATTRIBUTE_PURE static const char * +ATTRIBUTE_PURE_114833 static const char * getqzname(register const char *strp, const int delim) { register int c; diff --git a/private.h b/private.h index cf2370c8..cacbe444 100644 --- a/private.h +++ b/private.h @@ -562,6 +562,15 @@ typedef unsigned long uintmax_t; # define ATTRIBUTE_PURE __attribute__((pure)) #endif +/* Avoid GCC bug 114833 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114833>. + Remove this macro and its uses when the bug is fixed in a GCC release, + because only the latest GCC matters for $(GCC_DEBUG_FLAGS). */ +#ifdef GCC_LINT +# define ATTRIBUTE_PURE_114833 ATTRIBUTE_PURE +#else +# define ATTRIBUTE_PURE_114833 /* empty */ +#endif + #if (__STDC_VERSION__ < 199901 && !defined restrict \ && (PORT_TO_C89 || defined _MSC_VER)) # define restrict /* empty */ diff --git a/zdump.c b/zdump.c index 86aceb45..e8178733 100644 --- a/zdump.c +++ b/zdump.c @@ -97,7 +97,7 @@ static void showextrema(timezone_t, char *, time_t, struct tm *, time_t); static void showtrans(char const *, struct tm const *, time_t, char const *, char const *); static const char *tformat(void); -ATTRIBUTE_PURE static time_t yeartot(intmax_t); +ATTRIBUTE_PURE_114833 static time_t yeartot(intmax_t); /* Is C an ASCII digit? */ static bool @@ -134,7 +134,7 @@ size_overflow(void) /* Return A + B, exiting if the result would overflow either ptrdiff_t or size_t. A and B are both nonnegative. */ -ATTRIBUTE_PURE static ptrdiff_t +ATTRIBUTE_PURE_114833 static ptrdiff_t sumsize(ptrdiff_t a, ptrdiff_t b) { #ifdef ckd_add @@ -151,7 +151,7 @@ sumsize(ptrdiff_t a, ptrdiff_t b) /* Return the size of of the string STR, including its trailing NUL. Report an error and exit if this would exceed INDEX_MAX which means pointer subtraction wouldn't work. */ -ATTRIBUTE_PURE static ptrdiff_t +static ptrdiff_t xstrsize(char const *str) { size_t len = strlen(str); diff --git a/zic.c b/zic.c index 19a0b953..8d40fe3c 100644 --- a/zic.c +++ b/zic.c @@ -470,7 +470,7 @@ size_overflow(void) memory_exhausted(_("size overflow")); } -ATTRIBUTE_PURE static ptrdiff_t +ATTRIBUTE_PURE_114833 static ptrdiff_t size_sum(size_t a, size_t b) { #ifdef ckd_add @@ -484,7 +484,7 @@ size_sum(size_t a, size_t b) size_overflow(); } -ATTRIBUTE_PURE static ptrdiff_t +ATTRIBUTE_PURE_114833 static ptrdiff_t size_product(ptrdiff_t nitems, ptrdiff_t itemsize) { #ifdef ckd_mul @@ -499,7 +499,7 @@ size_product(ptrdiff_t nitems, ptrdiff_t itemsize) size_overflow(); } -ATTRIBUTE_PURE static ptrdiff_t +ATTRIBUTE_PURE_114833 static ptrdiff_t align_to(ptrdiff_t size, ptrdiff_t alignment) { ptrdiff_t lo_bits = alignment - 1, sum = size_sum(size, lo_bits); @@ -1435,7 +1435,7 @@ relname(char const *target, char const *linkname) /* Return true if A and B must have the same parent dir if A and B exist. Return false if this is not necessarily true (though it might be true). Keep it simple, and do not inspect the file system. */ -ATTRIBUTE_PURE static bool +ATTRIBUTE_PURE_114833 static bool same_parent_dirs(char const *a, char const *b) { for (; *a == *b; a++, b++) @@ -3627,7 +3627,7 @@ lowerit(char a) } /* case-insensitive equality */ -ATTRIBUTE_PURE static bool +ATTRIBUTE_PURE_114833 static bool ciequal(register const char *ap, register const char *bp) { while (lowerit(*ap) == lowerit(*bp++)) @@ -3636,7 +3636,7 @@ ciequal(register const char *ap, register const char *bp) return false; } -ATTRIBUTE_PURE static bool +ATTRIBUTE_PURE_114833 static bool itsabbr(register const char *abbr, register const char *word) { if (lowerit(*abbr) != lowerit(*word)) @@ -3652,7 +3652,7 @@ itsabbr(register const char *abbr, register const char *word) /* Return true if ABBR is an initial prefix of WORD, ignoring ASCII case. */ -ATTRIBUTE_PURE static bool +ATTRIBUTE_PURE_114833 static bool ciprefix(char const *abbr, char const *word) { do @@ -3762,7 +3762,7 @@ time_overflow(void) exit(EXIT_FAILURE); } -ATTRIBUTE_PURE static zic_t +ATTRIBUTE_PURE_114833 static zic_t oadd(zic_t t1, zic_t t2) { #ifdef ckd_add @@ -3776,7 +3776,7 @@ oadd(zic_t t1, zic_t t2) time_overflow(); } -ATTRIBUTE_PURE static zic_t +ATTRIBUTE_PURE_114833 static zic_t tadd(zic_t t1, zic_t t2) { #ifdef ckd_add -- 2.43.0
On 2024-05-26 20:16, Paul Eggert via tz wrote:
* Makefile (GCC_DEBUG_FLAGS): Omit -fno-common, as it is now the default. Omit -Wuninitialized as it’s implied by -Wall. Omit -Wno-address and -Wno-type-limits as they don’t seem to be needed with GCC 14. --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile index 6b093013..4d2ac1cf 100644 --- a/Makefile +++ b/Makefile @@ -313,7 +313,7 @@ GCC_INSTRUMENT = \ -fsanitize=undefined -fsanitize-address-use-after-scope \ -fsanitize-undefined-trap-on-error -fstack-protector # Omit -fanalyzer from GCC_DEBUG_FLAGS, as it makes GCC too slow. -GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ +GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 \ $(GCC_INSTRUMENT) \ -Wall -Wextra \ -Walloc-size-larger-than=100000 -Warray-bounds=2 \ @@ -332,10 +332,9 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \ -Wsuggest-attribute=const -Wsuggest-attribute=format \ -Wsuggest-attribute=malloc \ -Wsuggest-attribute=noreturn -Wsuggest-attribute=pure \ - -Wtrampolines -Wundef -Wuninitialized -Wunused-macros -Wuse-after-free=3 \ + -Wtrampolines -Wundef -Wunused-macros -Wuse-after-free=3 \ -Wvariadic-macros -Wvla -Wwrite-strings \ - -Wno-address -Wno-format-nonliteral -Wno-sign-compare \ - -Wno-type-limits + -Wno-format-nonliteral -Wno-sign-compare # # If your system has a "GMT offset" field in its "struct tm"s # (or if you decide to add such a field in your system's "time.h" file),
Please bear in mind major distros LTS and stable editions may still be on GCC 11, so patches *depending* on GCC 14 will have to be backed out, or code releases skipped until that support is available. [There is an issue with another project whose developer seems to think newer GCC releases should be made immediately available by all distros and backported to older and LTS editions, disregarding the minor requirement to test the new compiler by rebuilding many 1000s of packages, and address any issues caused.] -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retirer but when there is no more to cut -- Antoine de Saint-Exupéry
On 2024-05-27 08:59, brian.inglis--- via tz wrote:
major distros LTS and stable editions may still be on GCC 11, so patches *depending* on GCC 14 will have to be backed out, or code releases skipped until that support is available.
That shouldn't be a problem, as those compiler options are not used unless the developer specifically asks for them. As far as I know, I'm the only developer who does that, and I do so only with the latest GCC because it's not worth my time porting that stuff to older GCC (or to recent Clang, for that matter). I installed the attached to try to document this better, and also to remove a dependency of 'make check' on 'curl' that I noticed while looking into this. I tested by running 'make check' on Solaris 10 (2005), which is still supported by Oracle and which ships with GCC 3.4.3 (dated 2004) as an installable option. It worked fine, though I had to build as follows because Solaris 10 is so old its default environment does not conform to POSIX by default: make AWK=nawk SHELL=ksh CC='gcc -std=c99' check
participants (2)
-
brian.inglis@systematicsw.ab.ca -
Paul Eggert