In order to provide syntax highlighting, check and code outline, Eclipse is using a built-in C/C++ interpreter that is different from the gcc compiler used to build the firmwares.
Although the way code is interpreted is very close, it is not strictly equivalent, leading to many errors in the "Problem" tab, whereas the gcc compiler just works fine and generates a firmware without error or warning.
In particular, there are differences in the settings used by the built-in C/C++ interpreter that can be accessed from the "Window > Preferences" menu::
Among other things, the above settings set all limits that would otherwise stop indexing to extremely high values, enable all options and disable all skip ones. The indexer is also set to mirror the follow the changes of build configuration (Release, Debug...) such that preprocessor conditional blocks are greyed out correctly.
Make sure that all your settings match the above ones. Unfortunately, these settings are stored in each workspace, so there is no way to provide them by default for newer workspaces in an easy way ;
Once indexer settings changed, you must rebuild the index for each project by selecting the "Index > Rebuild" item in the project's contextual menu.