Description of problem: In RHEL 5.1 , Under certain situations, the 4.1.2 g++ compiler does not report a warning that a non-void function does not return a value when compiled with the -Wreturn-type compiler option. The 3.2.3 g++ compiler works. For example, given the following test program: // ******************** begin file.c ******************** typedef struct struct1 {} type1; typedef struct struct2 {} type2; // this function should return an int but does not int functionNoReturnValue() { } void functionWrongTypedArguments(type1 t1) { return; } int main() { type2 t2; functionNoReturnValue(); functionWrongTypedArguments(t2); return 0; } // ******************** end file.c ******************** try compiling as follows: % g++ -Wreturn-type file.c output from v4.1.2 is as follows: file.c: In function 'int main()': file.c:16: error: conversion from 'type2' to non-scalar type 'type1' requested Note the above has *no* warning message about control reaches end of non-void function. output from v3.2.3 is as follows: % g++ -Wreturn-type file.c file.c: In function `int functionNoReturnValue()': file.c:5: warning: control reaches end of non-void function file.c: In function `int main()': file.c:16: conversion from `type2' to non-scalar type `struct1' requested Note the above control reaches end of non-void function warning. How reproducible: Very much Steps to Reproduce: try the above code Actual results: no warning Expected results: warning displayed Additional info: Hi Heath, Here are the two resposes from our developers hope they are good enough reasons to get this fixed. 1)I'd first note that Solaris reports this as an ERROR. Engineers use Linux as development platform and CM builds encounter on all ports. Since Linux does not detect this prior to engineers' check-in, CM can not build Solaris . That impacts CM productivity and overall build turn-around time. Also, it's a regression from v3.2.3. We need this to be fixed. 2)Also, the warning catches a class of incorrect programs. Calling functions get an invalid return value leading to possible memory corruption and incorrect results. Productivity improves if this is caught up-front helping Cadence and the entire Linux community. regards Satya SEG Notes: The warning shows up at different levels of optimization. With gcc it always gets issued. With g++ it only gets displayed with -O3. Cadence considers this to be a regression from the 3.x compilers.