We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
int main(void) { int * x = &(int){0}; }
generates
#![allow(dead_code, mutable_transmutes, non_camel_case_types, non_snake_case, non_upper_case_globals, unused_assignments, unused_mut)] unsafe fn main_0() -> libc::c_int { let mut x: *mut libc::c_int = &mut 0 as libc::c_int as *mut libc::c_int; return 0; } pub fn main() { unsafe { ::std::process::exit(main_0() as i32) } }
but extra parentheses are needed
let mut x: *mut libc::c_int = &mut (0 as libc::c_int) as *mut libc::c_int;
This can happen in more realistic code when an output function parameter is being ignored f(&(int){0});
f(&(int){0});
If someone reads this issue and wonders if this is even legal C, check out compound literal
The value category of a compound literal is lvalue (its address can be taken). ...
The text was updated successfully, but these errors were encountered:
fw-immunant
Successfully merging a pull request may close this issue.
generates
but extra parentheses are needed
This can happen in more realistic code when an output function parameter is being ignored
f(&(int){0});
If someone reads this issue and wonders if this is even legal C, check out compound literal
The text was updated successfully, but these errors were encountered: