|
|
|
|
|
by jhgb
1488 days ago
|
|
Well, for instance, famously, any multiple-stack machines will have a hard time trying to run C because C assumes a single hardware stack. Although I imagine that currently, in most cases, you'll want to avoid C for software reasons, rather than hardware reasons (for example, you're required to deploy pure Java code, or pure C# code, or want to avoid any unsafe code in Rust, things like that). |
|
No, it doesn't. C does not even assume a stack. A platform where function call frames are allocated on the heap would not be incompatible with C.
You could say that some C code assumes a stack, but that's pretty exceptional.
> Although I imagine that currently, in most cases, you'll want to avoid C for software reasons,
Yes.
> rather than hardware reasons
Hard to imagine hardware on which C could not run. Maybe a JVM chip, but even then, you could compile C to bytecode.