https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102345
--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathaniel Shead <nsh...@gcc.gnu.org>: https://gcc.gnu.org/g:28b508233a12c13295f960a2cb8a4864879acfb4 commit r15-830-g28b508233a12c13295f960a2cb8a4864879acfb4 Author: Nathaniel Shead <nathanielosh...@gmail.com> Date: Sat May 25 01:03:54 2024 +1000 c++/modules: Improve diagnostic when redeclaring builtin in module [PR102345] If a user mistakenly includes a standard library header within the module purview, they currently get a confusing "declaration conflicts with builtin" error. This patch updates the message to include "in module", to help guide the user towards the likely cause. PR c++/102345 gcc/cp/ChangeLog: * module.cc (module_may_redeclare): Update error message. gcc/testsuite/ChangeLog: * g++.dg/modules/enum-12.C: Test for updated error. Signed-off-by: Nathaniel Shead <nathanielosh...@gmail.com>