[NSWI004] C language version and non-portable features

Petr Tůma petr.tuma at d3s.mff.cuni.cz
Fri Oct 18 07:36:17 CEST 2019


Hi,

in general, no restrictions except one - you have to get the code to work :-)

With some of the things you list, you may run into issues - off the top of my head, I can think of missing library functions that some of the code constructs may expect to have, possibly modifications of the linker script if the compiler emits something unusual, and so on - but most of these will probably end with build failure so are fairly safe to try. And if you can overcome the issues, for example by porting parts of libc into your kernel, then kudos to you and we're OK with it.

About the architecture, if your code runs on msim then that is generally enough. We may frown at some things, for example if you absolutely need a variable to be certain size it is better to use int8/16/32/whatever_t rather than rely on the platform specific size of types that are not portable, but it is more of a style issue than a blocker.

On the practical side, we rely on automation for some parts of the grading, so it may be a good idea to consult more extensive changes to the build system.

Petr

P.S.: If you get your kernel to run on any other architecture than msim, we accept that too :-)


On 17/10/2019 13:52, Richard Hladík wrote:
> Hello,
> 
>> What is the specific subset/superset of the C language we are allowed to
>> use? In particular:
>>
>> - Are we allowed to use C11?
>> - What about non-standard extensions, such as __builtin_*, nested
>>    functions, inline assembly?
>> - And what about architecture portability, e. g. data type sizes? Can we
>>    assume our code will only be run in the emulator?
>>
>> I'm asking about the assignments in general, not just the current one.
> 
> Bump :-)
> 
> Thanks for the reply
> Richard Hladík
> _______________________________________________
> NSWI004 mailing list
> NSWI004 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi004
> 


More information about the NSWI004 mailing list