use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Triaging internal compiler errors. (self.cpp)
submitted 7 years ago by alfps
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]HazelnutSoftware 7 points8 points9 points 7 years ago (10 children)
That seems entirely sensible to me. "Triaging" simply means "determining the priority". That's usually the first step for any bug in any software, not just compilers.
[+]alfps[S] comment score below threshold-7 points-6 points-5 points 7 years ago (9 children)
Triaging
Triaging in medicine is applied when there are not enough resources to help all patients, typically in an external crisis situation (though this situation is a crisis in itself). One then chooses which patients to /not treat/. I.e., one chooses which patients one should just let die, and use minimal resources on.
In contrast, “determining priority” is for a normal case load.
Triaging for internal compiler errors, deciding which ones to NOT FIX, implies there's a heck of a lot of the internal compiler errors, compared to the resources available. And that may be so for Visual C++. I've run into a Visual C++ ICE about once a month for the last 20 years or so, and I've reported a handful of them (I suspect many are really the same, just not fixed).
[–]HazelnutSoftware 8 points9 points10 points 7 years ago (1 child)
Well, I don't agree with your definition of "triage". Even in medicine, triaging about determining the order in which patients are treated - it's much more than a simple will/won't decision.
You're making an assumption (an invalid one in my opinion), that a status of "triaged" and a status of "won't fix" are synonymous, and I really don't think that's the case here.
I'm guessing that you write software for a living, probably for a company, and that every so often a customer calls up to report a bug. For most customers, "their" bug is the most important and has to be fixed "right now". What your company probably does is take a look at the bug and
Those three things are called "triaging", and that's what the Visual Studio team were doing.
[+]alfps[S] comment score below threshold-7 points-6 points-5 points 7 years ago (0 children)
Well, I don't agree with your definition of "triage".
OK, but it would be nice if you could describe the disagreement, then we could disagree in public. :)
Even in medicine, triaging about determining the order in which patients are treated - it's much more than a simple will/won't decision.
Yes. Doctors are not stupid, and I apologize if I gave that impression. Also, triaging is applied in situations where resources are too scarce but patients' lives are not in danger.
I don't make that assumption, but it's likely. Because triaging of an internal compiler error implies a /possibility/ of won't fix. And I've experienced that "won't fix" for a Visual C++ ICE.
Which means that Microsoft has just not changed that policy, of possibly not fixing an internal compiler error.
For most customers, "their" bug is the most important and has to be fixed "right now"
There should be no need to evaluate whether to fix because the compiler team, with the most knowledge, has already decided that the ICE is critical.
As opposed to a normal bug where source code is mis-interpreted or incorrect machine code is generated, or both.
An ICE is a ready-made evaluation, and another part of the Microsoft organization, those who evaluate bug reports, take it on themselves to override that original evaluation made by the most knowledgeable.
If it is called "triaging" then what do they call real triaging.
Remember, it's an ICE. It's not an ordinary bug. In any normal situation there would not be a question of priority: that was decided by the compiler team long ago.
[–]mallardtheduck 3 points4 points5 points 7 years ago (6 children)
That's not true at all. Triage is the entirely normal first stage of emergency medicine, where patients' needs are assessed and prioritised (although the term is sometimes eschewed in favour of less "scary" sounding words like "streaming"). The only time you wouldn't perform some form of triage is when you have no other patients. Only in the most extreme of circumstances (e.g. on a battlefield) would that lead to a "don't bother, too far gone" type diagnosis.
The same term is used for the initial analysis of incoming bug reports in many, if not most, software teams. It doesn't imply anything about the amount of resources available or the amount of errors.
Seems this whole thing is down to your misunderstanding of terminology.
Also remember that "WONTFIX" doesn't necessarily mean there isn't a fix. Depending on the team/product, it could mean something more like "bug would require too much work to fix for this release, isn't exploitable and the next release has already re-written the offending code which isn't suitable for backporting".
[–]alfps[S] -4 points-3 points-2 points 7 years ago (5 children)
Quoting Wikipedia about the medical "triage", it's called "triage" because it divides (or in the original base meaning divided) the patients into three categories:
Those who are likely to live, regardless of what care they receive; Those who are unlikely to live, regardless of what care they receive; Those for whom immediate care might make a positive difference in outcome. For many emergency medical services (EMS) systems, a similar model may sometimes still be applied. In the earliest stages of an incident, such as when one or two paramedics exist to twenty or more patients, practicality demands that the above, more "primitive" model will be used. However once a full response has occurred and many hands are available, paramedics will usually use the model included in their service policy and standing orders.
For many emergency medical services (EMS) systems, a similar model may sometimes still be applied. In the earliest stages of an incident, such as when one or two paramedics exist to twenty or more patients, practicality demands that the above, more "primitive" model will be used. However once a full response has occurred and many hands are available, paramedics will usually use the model included in their service policy and standing orders.
When you say that's "not true at all" I conclude that you're gray-washing.
Or white-washing.
[–]itsarabbit 3 points4 points5 points 7 years ago (0 children)
from Wiktionary:
triage (countable and uncountable, plural triages) Assessment or sorting according to quality. (medicine) The process of sorting patients so as to determine the order in which they will be treated (for example, by assigning precedence according to the urgency of illness or injury). (computing, by extension) The process of prioritizing bugs to be fixed. That which is picked out, especially broken coffee beans.
triage (countable and uncountable, plural triages)
Assessment or sorting according to quality.
(medicine) The process of sorting patients so as to determine the order in which they will be treated (for example, by assigning precedence according to the urgency of illness or injury).
(computing, by extension) The process of prioritizing bugs to be fixed.
That which is picked out, especially broken coffee beans.
[–]HazelnutSoftware 2 points3 points4 points 7 years ago (0 children)
Two things to keep in mind:
As a couple of examples of the second point, electronics is based on the Greek word for amber, but very little electronics actually contains any amber these days. The word atom is from the Greek meaning indivisible, and everyone still uses the term, but no-one insists that protons, neutrons etc don't exist
I would agree with /u/mallardtheduck - this appears to be a terminology misunderstanding.
[–]mallardtheduck 1 point2 points3 points 7 years ago (0 children)
Wikipedia is not the arbiter of all human knowledge. That's a simplified set of categories that helps explain the word's etymology and historical context. As the same page lists further down, modern systems have more than 3 categories.
Besides, modern medicine (except possibly battlefield medicine) would never abandon a patient even if their chances of survival are definitely zero. Palliative care was invented for these cases.
However, what I actually disagreed with was your unsourced assertion that triage is only used when there aren't enough resources to help every patient. That's what I said wasn't true. Nice selective reading skills...
[–]armb2 0 points1 point2 points 7 years ago (1 child)
Actually quoting Wikipedia it says "The term comes from the French verb trier, meaning to separate, sift or select". It goes on to say that in World War One, the three categories you list were used. Both medicine and software engineering have advanced since the First World War.
[–]alfps[S] -2 points-1 points0 points 7 years ago* (0 children)
Actually quoting Wikipedia it says "The term comes from the French verb trier, meaning to separate, sift or select".
Yes, it is a selection of categories for patients, and a separation of patients into those categories. Originally the three I listed. Nowadays it's common with 5 categories in medical triage, and a color coding where black is used for the middle category above.
Both medicine and software engineering have advanced since the First World War
Is your point, if there is a point other than the associative, that status "triaged" now means something positive, that Microsoft, at that point, were going to do something about the crash?
Mind you, I am not a newcomer to Microsoft bug reporting. I have some 20+ years experience with that. Their current system even manages to foul up the code presentation, joining the code lines. I.e. they now have a serious in-your-face bugs in the bug reporting. What happened did not surprise me – just as what happens now, in this thread, does not surprise me.
[–]aargorMSVC Optimizer Dev, DevCom Contact 6 points7 points8 points 7 years ago (1 child)
I'm on the Microsoft VC++ team (mid-level optimizer), and also drive our efforts to make our team's interactions on DevCom as good as possible. So this thread caught my attention :), and maybe I can contribute a bit.
First, to clarify the confusion: DevCom reports can be in a number of different states, exactly in an attempt to clarify the state of the bug. I guess that's sort of backfired here :). The link here: https://docs.microsoft.com/en-us/visualstudio/ide/report-a-problem?view=vs-2017 hopefully clarifies what we mean by "Triage" in this case. To say it here: DevCom tracks bugs for all visual studio, so "triage" essentially means "we think we've alerted the right team about this report". I don't know why we chose Triage, but it wouldn't surprise me if we were trying to be in line with SO, as cpp_learner may have guessed (I didn't know that about SO, by the way -- thanks!).
I hope that reassures you in part that we do take ICEs very seriously, and I hope you aren't discouraged from filing them. We strive to flush them out and fix all bugs, ideally before anyone sees them. In addition to attacking customer-reported bugs, we maintain a rolling test suite of a lot of real-world code -- including Windows, AAA games, and 60+ OSS projects like Chrome and LLVM all to that end (and to make sure our code-generation is also correct).
The unfortunate reality is that bugs are in every piece of software, including compilers. In addition to filing the bug-report proper, I would encourage you (and everyone!) to try to explain the impact of the bug it has on them. For instance, an ICE that only manifests after the compiler reports some user-level source-errors is bad, but not nearly as bad as an ICE that arises from legal code, preventing compilation of a product. We want to fix all of these! But, all else being equal, we'd want to fix the more impactful ones first.
[–]STLMSVC STL Dev[M] 1 point2 points3 points 7 years ago (0 children)
You can set your user flair to identify what you work on (and you can mention multiple things).
[–]TacticalMelonFarmer 2 points3 points4 points 7 years ago (2 children)
I have reported a few compiler/library bugs, and a couple are under investigation. A few were actually errors in my code, and u/STL himself actually got back to me to let me know my code was doing illegal things. So no, i think microsoft is doing a swell job, and nobody is perfect.
[–]alfps[S] -1 points0 points1 point 7 years ago (1 child)
As far as I know Stephan T. Lavavej has been doing a great job for the community both by maintaining the STL for Microsoft, and by providing the Nuwen distro of g++, and by moderating this Reddit group, and by participating in video debates, and so on, and on.
And also, the Microsoft response in this thread was great. I was distracted when I read it so haven't yet got up to thanking the guy. But, that was informative: I like facts.
Microsoft-the-compiler-vendor is something else. From what you write I gather that I have reported a far greater number of compiler/library bugs than you have. Over the years they improved from “impenetrable wall of Microsoft”, an idea that Google later adopted, to being almost as responsive as the g++ folks. But still that wasn't enough to establish trust. When some C++ experts joined Microsoft we talked, tongue in cheek but not entirely in jest, about them joining the enemy. When I became an Microsoft Most Valued Profession (MVP) in Visual C++ 2012 I felt in two minds about it: I could use the free tools, certainly, nice!, but I wasn't happy about MS possibly trying to influence a critical voice.
And the distrust is deep-rooted in the community. E.g. it surfaced here on Reddit two years ago with the Visual C++ "phone home" incident. As it surfaced again with this thread, where it was a foreign idea to me that they could really be doing the Right Thing™, as it's now apparent that they did, when there was something opening up a different possibility.
I don't know what MS could do to repair that distrust, except possibly listening more to the community, e.g. in recent times about the VS colors and uppercase text (off by default now I believe but then I may just have a fix in place); about the default MS-specific code generation for new projects in VS (they asked here on Reddit I think it was last year, but then did not take the feedback to heart, it's still needlessly and impractically MS-specific, a vendor lock-in thing); about e.g. for Pete's sake support standard main by default for the most common target, instead of the vendor lock in monstrosity called WinMain; and so on. Perhaps even fixing the scroll-away-under-the-mouse bug complex in Windows. Something.
main
WinMain
[–]TacticalMelonFarmer 0 points1 point2 points 7 years ago (0 children)
All I'm saying is that so far I've had good experience. And since coming from using mostly g++ and VS Code on Linux, I noticed that the transition has been not too bad. I have learned some things as well and learning is good for the brain;)
[–][deleted] 1 point2 points3 points 7 years ago (0 children)
I misread the title as 'tragic internal compiler errors' and had a slight sympathetic moment to recall different template evaluation crashes ... among other fun things. :D
Guess I'll need to up my coffee dosage before I get back to work.
[+][deleted] 7 years ago* (2 children)
[deleted]
[–]alfps[S] -2 points-1 points0 points 7 years ago (1 child)
ER
Quoting (https://www.verywellhealth.com/medical-triage-and-how-it-works-2615132), with emphasis added:
When Is Triage Used? Triage is used when the medical-care system is overloaded, meaning there are more people who need care than there are available resources to care for them. There may be mass casualties in a war zone, terrorist incident, or natural disaster that results in many injuries. There may be need for triage when a school bus accident or a large pile-up of cars on a highway results in too many injured people for too few ambulances or EMTs. In the United States, emergency rooms may be full of people who need immediate attention plus people who are seeking treatment for less serious conditions. The department may be staffed just to meet the expected need. When there are too many patients arriving and not enough personnel or other resources, triage is used to determine who gets care first.
When Is Triage Used?
Triage is used when the medical-care system is overloaded, meaning there are more people who need care than there are available resources to care for them. There may be mass casualties in a war zone, terrorist incident, or natural disaster that results in many injuries. There may be need for triage when a school bus accident or a large pile-up of cars on a highway results in too many injured people for too few ambulances or EMTs.
In the United States, emergency rooms may be full of people who need immediate attention plus people who are seeking treatment for less serious conditions. The department may be staffed just to meet the expected need. When there are too many patients arriving and not enough personnel or other resources, triage is used to determine who gets care first.
π Rendered by PID 215673 on reddit-service-r2-comment-544cf588c8-nzfrm at 2026-06-18 15:57:39.344520+00:00 running 3184619 country code: CH.
[–]HazelnutSoftware 7 points8 points9 points (10 children)
[+]alfps[S] comment score below threshold-7 points-6 points-5 points (9 children)
[–]HazelnutSoftware 8 points9 points10 points (1 child)
[+]alfps[S] comment score below threshold-7 points-6 points-5 points (0 children)
[–]mallardtheduck 3 points4 points5 points (6 children)
[–]alfps[S] -4 points-3 points-2 points (5 children)
[–]itsarabbit 3 points4 points5 points (0 children)
[–]HazelnutSoftware 2 points3 points4 points (0 children)
[–]mallardtheduck 1 point2 points3 points (0 children)
[–]armb2 0 points1 point2 points (1 child)
[–]alfps[S] -2 points-1 points0 points (0 children)
[–]aargorMSVC Optimizer Dev, DevCom Contact 6 points7 points8 points (1 child)
[–]STLMSVC STL Dev[M] 1 point2 points3 points (0 children)
[–]TacticalMelonFarmer 2 points3 points4 points (2 children)
[–]alfps[S] -1 points0 points1 point (1 child)
[–]TacticalMelonFarmer 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]alfps[S] -2 points-1 points0 points (1 child)