|
2004-04-14
| ||
| 15:56 | • Closed ticket [934697ffff]: OSX warnings and errors (3) plus 8 other changes artifact: 094174268f user: dkf | |
| 03:50 | • New ticket [934697ffff]. artifact: b9f2eb210c user: tauvan | |
OSX warnings and errors (3)
Closed / Rejected934697ffffffffffffffffffffffffffffffffffCreated 23 years agoUpdated 23 years ago
Descriptionplain2004-04-14 03:50:01
machine: mac ppc G4 (1st PCI 400Mhz) OSX 10.1.5
My (3) suggestion is:
change tcl.h
however need to be sure of other machines
Solves:
warning: negative integer implicitly converted to unsigned type
Condition:
"OSX warnings and errors (1)" not required
"OSX warnings and errors (2)" performed
quick fix performed
trash previous builds (not just clean)
Results from (2):
w/o (1) Total 10602 Passed 9717 Skipped 858 Failed 27
w/ (1) Total 10602 Passed 9717 Skipped 858 Failed 27
Suggestion:
change existing code to this:
#if !defined(NO_STDARG)
# include <stdarg.h>
# undef __va_rounded_size(TYPE)
# undef __va_align(AP, TYPE)
# define __va_rounded_size(TYPE) ((sizeof (TYPE) + 3) &
(_BSD_SIZE_T_)(~3))
# define __va_align(AP, TYPE)\
((((unsigned long)(AP)) + ((__alignof__ (TYPE) == 16) ? 15 :
3))\
& (_BSD_SIZE_T_)(~((__alignof__ (TYPE) == 16) ? 15 : 3)))
# define TCL_VARARGS(type, name) (type name, ...)
# define TCL_VARARGS_DEF(type, name) (type name, ...)
# define TCL_VARARGS_START(type, name, list) (va_start(list,
name), name)
#else
# include <varargs.h>
# undef __va_rounded_size(TYPE)
# undef __va_align(AP, TYPE)
# define __va_rounded_size(TYPE) ((sizeof (TYPE) + 3) &
(_BSD_SIZE_T_)(~3))
# define __va_align(AP, TYPE)\
((((unsigned long)(AP)) + ((__alignof__ (TYPE) == 16) ? 15 :
3))\
& (_BSD_SIZE_T_)(~((__alignof__ (TYPE) == 16) ? 15 : 3)))
# define TCL_VARARGS(type, name) ()
# define TCL_VARARGS_DEF(type, name) (va_alist)
# define TCL_VARARGS_START(type, name, list) \
(va_start(list), va_arg(list, type))
#endif
Special Notes:
The difference should be &(ing) with typecast of
(_BSD_SIZE_T_)
Used this typecast to keep same width as sizeof (hopefully)
Not sure about other platform headers but I think safe as
I think va_arg standard?
Results from (3):
approx. 40 less warnings
w/o (1) Total 10602 Passed 9717 Skipped 858 Failed 27
w/ (1) Total 10602 Passed 9717 Skipped 858 Failed 27
Thanks.
dkfplain2004-04-14 15:56:28
Logged In: YES user_id=79902 No. Tcl is not broken and your suggested change will break other platforms. It's also very ugly. If you have a problem with this, file a bug report with Apple about their poor headers. (_BSD_SIZE_T is not defined on Linux, Solaris or Windows.)
Log in (anonymous is fine) to add a comment.