It's UWAweek 42 (2nd semester, week 12)

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 738 articles.
Currently 183 other people reading this forum.


 UWA week 38 (2nd semester, week 8) ↓
SVG not supported

Login to reply

👍?
helpful

"Seoyoung Park" [email protected] wrote:

Hi,

Are we supposed to compile and run generated c file from .ml file with -Wall -Werror flags?

For example,

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

Or is it acceptable to compile without the flags, like this?

cc -std=c11 -o sample sample.c

I was compiling sample ml files with these flags through runml, but it throws an unused variable error and terminates when I run the provided sample01.ml. However, it works fine without the -Wall -Werror flags.

The project instructions mention using these flags when compiling runml.c, but I’m unsure if they also apply when compiling the sample .ml files.

I don’t think this issue is due to my code, but I would like to confirm whether it will affect the project mark.

Thanks in advance.

Amitava said you can do either.

For unused variable multiply the variable by 1 and the error goes 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