It's UWAweek 7

help2002

This forum is provided to promote discussion amongst students enrolled in CITS2002 Systems Programming.
Please consider offering answers and suggestions to help other students! And if you fix a problem by following a suggestion here, it would be great if other interested students could see a short "Great, fixed it!"  followup message.
Displaying selected article
Showing 1 of 835 articles.
Currently 1 other person reading this forum.


SVG not supported

Login to reply

👍?
helpful
7:14am Fri 13th Sep, Joshua N.

"Harrison Lisle" [email protected] wrote:

Hello,

I understand that the program must be compiled using the command:

cc -std=c11 -Wall -Werror -o runml runml.c

But must the translated code produced by the program do the same? Because this would cause issues depending on the ML code written. Such as:

var <- 6
print 7

Since var is not used, Werror would throw an error!

ml-51566.c:14:8: error: unused variable 'var' [-Werror,-Wunused-variable]
double var = 8;
       ^
1 error generated.

This would not be a fault of the project programmer, but of the test itself. Should this be caught by the compiler, or can we compile using cc/gcc instead of the more intensive error checking.

Thanks.

If you want to be 100% sure you can ask Amitava.

You can always do something with var to remove the warning. Literally just do var = var*1 and the warning will go away.

The University of Western Australia

Computer Science and Software Engineering

CRICOS Code: 00126G
Written by [email protected]
Powered by history
Feedback always welcome - it makes our software better!
Last modified  8:08AM Aug 25 2024
Privacy policy