xiaoxiang781216 commented on PR #6606: URL: https://github.com/apache/incubator-nuttx/pull/6606#issuecomment-1183967732
> @ALTracer Yes and that is exactly what I was posting in my comment above. Having decoupled `LIBC_LONG_LONG` and `HAVE_LONG_LONG` separately does not make sense because: > > ``` > #ifdef CONFIG_HAVE_LONG_LONG > mount_sprintf(info, " %-10s %6llu%c %8llu%c %8llu%c %s\n", fstype, > size, sizelabel, used, usedlabel, free, freelabel, > mountpoint); > #else > mount_sprintf(info, " %-10s %6ld%c %8ld%c %8ld%c %s\n", fstype, > size, sizelabel, used, usedlabel, free, freelabel, > mountpoint); > #endif > ``` But this type of change isn't good, since we need modify all places which use long long. The better fix is let printf always support `ll` but cast to unsigned long like this: ``` unsigned long xxx = (unsigned long)var_arg(ap, unsigned long long); ``` In this case, the code size increase is very small. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org