When calling a procedure with signed char or short arguments using -sizeof() as an expression, an "<filename>:<line#>: warning: overflow in implicit constant conversion" is output. Arguments with int or long do not. This happens even though there is no real overflow (e.g. if -sizeof() evaluates to -4). See attached test program (compiled using command line m68k-elf-g++ -c testcpp.cpp). Proper code is produced. Warning can be avoided by casting sizeof() to int (i.e. -(int)sizeof() ). Similar results are obtained when returning a -sizeof() value in procedures with return type signed char or short. This warning does not occur in revision 3.4.6.
Created attachment 13926 [details] Test code fragment compiled m68k-elf-g++ -c testpp.cpp Lines end in \r\n.
The type of sizeof is unsigned. So you really have (short)(unsigned)-4 .
Not a bug.