From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <102653647622044.tru64-unix-managers.marc@archive.invalid> From: Frank Wortner Date: Tue, 22 May 2001 18:55:53 +0000 To: tru64-unix-managers Subject: Compaq C++ Question X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=102653647622044 A couple of developers walked into my office with the following program: #include #include void main() { signal(SIGFPE, SIG_DFL); printf("hello\n"); return; } They had named it "test.cxx" and fed it to Compaq C++ Version 6.3A. cxx -std strict_ansi_errors test.cxx The result they got was: cxx: Warning: test.cxx, line 5: return type of function "main" must be "int" main() ^ cxx: Error: test.cxx, line 7: argument of type "void (*)()" is incompatible with parameter of type "void (*)(int) C" signal(SIGFPE, SIG_DFL); ---------------^ cxx: Info: 1 error detected in the compilation of "test.cxx". The program compiles correctly without the "-std strict_ansi_errors" option, and they want to know why. Now, I'm really old ;-), so I don't understand a lot of C++'s ins and outs. Could anyone help me come up with a reasonable explanation? Thanks! Frank