I just spent hours banging my head off the table because of this. I forgot that the word register is a keyword when writing C code. Clang and gcc both kept throwing totally random errors when I was writing the function void print_single_register(char *register, pid_t child_pid);. I finally brought the function into Xcode which showed register in the keyword color. It turns out that Sublime will not recognize it as a keyword if it comes after the type definition, only if it comes before the type definition like it should (register int i = 0;). This is most likely a bug in the definition of the C syntax highlighting built into Sublime. The “C Improved” syntax definition I have installed through Package Manager highlights it correctly.
Bug with “register" keyword
alex_taffe
#1
0 Likes