Skip to main content
t_j_l
Associate II
December 9, 2025
Question

sometimes some unnecessary #include statements automatically added.

  • December 9, 2025
  • 1 reply
  • 1168 views

When writing code, it is common to encounter the automatic inclusion of some unnecessary #include statements. For example, when I input "NULL" and press the Enter key, it will automatically add " #include <cstddef> ".5d4efb0c-42c5-4875-87f1-2af14162023c.png9e383e1b-8f6b-416c-b886-7a4e14d63698.png

1 reply

TDK
Super User
December 10, 2025

This is hard to follow. Where are you inputting NULL? Is this an autocomplete thing?

the IDE shows the file has been modified, but changing the file outside of user code blocks shouldn’t be done.

"If you feel a post has answered your question, please click ""Accept as Solution""."
t_j_l
t_j_lAuthor
Associate II
December 10, 2025

I entered "uint32_t *pi = NULL" in the user code section. When I pressed the Enter key while the code for handling the NULL input was being displayed, it automatically added "#include"

Andrew Neil
Super User
December 10, 2025

That seems a fairly reasonable thing to do: you've used NULL, so you will need a definition of it - it has just provided that definition for you.

What's the problem with that?

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.