Skip to content

Commit a3c9318

Browse files
glankkdanmar
andauthored
Update simplecpp.cpp
Co-authored-by: Daniel Marjamäki <daniel.marjamaki@gmail.com>
1 parent d3f8a97 commit a3c9318

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

simplecpp.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -767,15 +767,16 @@ void simplecpp::TokenList::readfile(Stream &stream, const std::string &filename,
767767
msg += "Line number zero is undefined behavior.";
768768
} else {
769769
msg += "Line numbers above " + std::to_string(maxline) + " are ";
770-
if (unknown_std || cppstd >= CPP26)
770+
if (unknown_std)
771+
msg += "undefined behavior or conditionally supported";
772+
else if (cppstd >= CPP26)
771773
msg += "conditionally supported";
772774
else
773775
msg += "undefined behavior";
774-
msg += " in ";
775776
if (cstd != CUnknown)
776-
msg += getCStdName(cstd);
777-
else
778-
msg += getCppStdName(unknown_std ? CPP26 : cppstd);
777+
msg += " in " + getCStdName(cstd);
778+
else if (cppstd != CPPUnknown)
779+
msg += " in " + getCppStdName(cppstd);
779780
msg += ".";
780781
}
781782
simplecpp::Output err{

0 commit comments

Comments
 (0)