rust-lang / nomicon

The Dark Arts of Advanced and Unsafe Rust Programming
https://doc.rust-lang.org/nomicon/
Apache License 2.0
1.75k stars 256 forks source link

FFI: make gcc command clearer #389

Closed kraktus closed 1 year ago

kraktus commented 1 year ago

Didn't check if gcc was accepting the flag without space but it definitely reduced the comprehension when first encountering it.

ehuss commented 1 year ago

gcc explicitly recommends not using separate arguments. I'd be a little leery of using a form that isn't recommended (and pretty rare in my experience). I understand that it can look a little strange, but I think I would prefer to keep with established norms.

kraktus commented 1 year ago

I see, I was not aware of this convention. it is only established for the -l flag? Since other args are separate arguments (well only the output one)

ehuss commented 1 year ago

-l and -L are the ones I am most aware of that usually do not use a space. Long flags usually use an equals or a space.

kraktus commented 1 year ago

Ok thanks for the feedback!