Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

Syntax error when concatenating C printf and scanf format strings with defines from inttypes.h #45

Open
ghost opened this issue Jul 27, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 27, 2017

When using printf and scanf types defined in stdint.h such as uint64_t the correct (and portable) way is to use defines from inttypes.h:
#include <inttypes.h>
uint64_t i;
scanf("%"SCNu64, &i);
Because an uint64_t is not always a long long int, but standard C highlighting as well as C improved highlight the percent sign as a syntax error. Could you please make it recognize it as a correct syntax?

@abusalimov
Copy link
Owner

@turdo thank you for reporting this. I afraid, I can't devote enough time to this project at the moment. If you know how to fix it, please feel free to make a PR!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant