Design Decisions
The severity of undefined behavior (UB) is sometimes less than error
- UB that is common and likely to work => portability
- UB that is uncommon, suspicious or avoidable, but likely to work => warning
- UB that is unlikely to work => error
Reasons:
- "char* p = 0x400;" causes UB, but when writing software for hardware there might be no alternative way for doing it.
- Standard is not absolutely clear weather calling static member function via null pointer is UB or not. http://stackoverflow.com/questions/2474018/when-does-invoking-a-member-function-on-a-null-instance-result-in-undefined-beha
Reasons against:
- The only solid base for the correctness of the code is the standards.
- Dividing the UB into different groups is based on opinions, not on any facts.
Use --option=value format for long command line options that take value in documentation
Reasons:
- It is the GNU standard and also followed by many programs: http://www.gnu.org/s/hello/manual/libc/Argument-Syntax.html
- For usability, we should use one style everywhere
- We already use it everywhere
see also: CodingStyle
Last modified
14 years ago
Last modified on 01/14/2012 10:43:24 AM
Note:
See TracWiki
for help on using the wiki.