Ask Your Question
0

What is the meaning of the error message "scrabble.c:27:1: error: non-void function does not return a value [-Werror,-Wreturn-type]"?

asked 2022-11-16 11:00:00 +0000

david gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-06-14 19:00:00 +0000

plato gravatar image

The error message indicates that there is a non-void function (a function with a return type other than void) in the file "scrabble.c" that does not have a return statement. This is not allowed because the function is expected to return a value of its specified return type, and not doing so can lead to unexpected behavior or errors in the program. The compiler is flagging this as an error (not just a warning) due to the use of the "-Werror" and "-Wreturn-type" flags, which treat warnings as errors.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2022-11-16 11:00:00 +0000

Seen: 9 times

Last updated: Jun 14 '22