Thanks for the reply, and I apologize for not providing more detailed information about the versions involved.
I'm on macOS 27.0 (26A428) on an M1 Mac mini. This behavior was seen on the released Xcode 27.0 (from the Mac App Store) and 27.1 beta downloaded from the Apple Developer web site.
The issue I've seen are on C++ projects that were created under earlier versions of Xcode and last built with Xcode 26 on macOS 26.
I created a new Command Line Tool project with the C++ language. I set the scheme for the build to run under Terminal.
main.cpp is the following sample C++ "hello world" program:
int main(int argc, const char * argv[]) {
// insert code here...
std::cout << "Hello, World!\n";
return EXIT_SUCCESS;
}
Compile/build ran fine. Same issue occurred.
I also created another new project and selected the C language. I used your sample code as main.c. Same issue.