Click here to Skip to main content
15,887,746 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Well that isn't good. Pin
jochance23-Dec-23 8:55
jochance23-Dec-23 8:55 
GeneralRe: Well that isn't good. Pin
DerekT-P22-Dec-23 5:56
professionalDerekT-P22-Dec-23 5:56 
GeneralRe: Well that isn't good. Pin
jschell22-Dec-23 6:07
jschell22-Dec-23 6:07 
Question( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Maximilien21-Dec-23 2:35
Maximilien21-Dec-23 2:35 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? PinPopular
0x01AA21-Dec-23 2:50
mve0x01AA21-Dec-23 2:50 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
k505421-Dec-23 4:14
mvek505421-Dec-23 4:14 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Bruno van Dooren21-Dec-23 21:59
mvaBruno van Dooren21-Dec-23 21:59 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
CPallini21-Dec-23 2:54
mveCPallini21-Dec-23 2:54 
I think it was never required.
However, someone wrote[^]:

If no return statement appears in a function definition, control automatically returns to the calling function after the last statement of the called function is executed. In this case, the return value of the called function is undefined. If the function has a return type other than void, it's a serious bug, and the compiler prints a warning diagnostic message. If the function has a void return type, this behavior is okay, but may be considered poor style. Use a plain return statement to make your intent clear.


Note, it's not me. I think omitting the return statement in a void function it is fine.
"In testa che avete, Signor di Ceprano?"
-- Rigoletto

GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
obermd21-Dec-23 3:44
obermd21-Dec-23 3:44 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Amarnath S21-Dec-23 2:56
professionalAmarnath S21-Dec-23 2:56 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Mircea Neacsu21-Dec-23 3:05
Mircea Neacsu21-Dec-23 3:05 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
jschell21-Dec-23 4:11
jschell21-Dec-23 4:11 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
PIEBALDconsult21-Dec-23 5:29
mvePIEBALDconsult21-Dec-23 5:29 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Gary Wheeler21-Dec-23 6:46
Gary Wheeler21-Dec-23 6:46 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
hpcoder217-Jan-24 16:12
hpcoder217-Jan-24 16:12 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
PIEBALDconsult21-Dec-23 4:18
mvePIEBALDconsult21-Dec-23 4:18 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
0x01AA21-Dec-23 5:02
mve0x01AA21-Dec-23 5:02 
AnswerRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
honey the codewitch21-Dec-23 4:25
mvahoney the codewitch21-Dec-23 4:25 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
Gary Wheeler21-Dec-23 7:06
Gary Wheeler21-Dec-23 7:06 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
honey the codewitch21-Dec-23 7:08
mvahoney the codewitch21-Dec-23 7:08 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
CPallini21-Dec-23 7:41
mveCPallini21-Dec-23 7:41 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
honey the codewitch21-Dec-23 7:42
mvahoney the codewitch21-Dec-23 7:42 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
CPallini21-Dec-23 10:25
mveCPallini21-Dec-23 10:25 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
honey the codewitch21-Dec-23 10:26
mvahoney the codewitch21-Dec-23 10:26 
GeneralRe: ( C/C++ historical question) was there a point in time where adding a return at the end of a void function was required ? Pin
megaadam21-Dec-23 11:55
professionalmegaadam21-Dec-23 11:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.