Packages
Packages copied to clipboard
[C] Incorrect error indication when a function return type is on the line before the function name and struct/enum types are used
- Sublime Version: 3211
- OS Version: Ubuntu 20.04
enum foo {
SOME_VAL
};
struct bar {
};
enum foo
baz(struct bar *a)
{
return SOME_VAL;
}

This code compiles without error with GCC:
gcc -c sublime_text_test.c
This is possible to handle as of ST4 and requires quite a bunch of syntax rework to make it use the new branching feature to overcome line blindness. A prototype how to handle those situations can be found in #2654.
Similar to C++ namespace function with struct return values:
(notice the italic font of baz and Bar:: should be in green)
