Questions tagged [standards-compliance]
400 questions
20
votes
5 answers
How to programmatically turn off quirks mode in IE8 WebBrowser control?
I want to use IE8 as a WebBrowser control in a C# application. How can I disable "quirks mode" and force IE into standards compliance (as far as it is implemented)?

Tony the Pony
- 40,327
- 71
- 187
- 281
20
votes
3 answers
Dependencies in Initialization Lists
Is this behavior well-defined?
class Foo
{
int A, B;
public:
Foo(int Bar): B(Bar), A(B + 123)
{
}
};
int main()
{
Foo MyFoo(0);
return 0;
}

Maxpm
- 24,113
- 33
- 111
- 170
20
votes
11 answers
Is XHTML compliance pointless?
I'm building a site right now, so far I've painfully forced everything to be compliant and it looks pretty much the same across browsers. However, I'm starting to implement some third party/free javascripts which do things like add attributes (eg.…

GBa
- 17,509
- 15
- 49
- 67
18
votes
3 answers
Current state of HTTP State Management Mechanism (Cookies)
I was wondered whether there is a survey or report of the current state of browser compliance with the three Cookie specifications: Netscape’s original draft, RFC 2109, and RFC 2965 that obsoletes RFC 2109.
I know that, due to its age, Netscape’s…

Gumbo
- 643,351
- 109
- 780
- 844
18
votes
4 answers
Why does std::cout convert volatile pointers to bool?
If you try to cout a pointer to a volatile type, even a volatile char pointer where you would normally expect cout to print the string, you will instead simply get '1' (assuming the pointer is not null I think). I assume output stream operator<< is…

Joseph Garvin
- 20,727
- 18
- 94
- 165
18
votes
4 answers
Kernel's "container_of" - any way to make it ISO conforming?
While looking at Linux kernel's implementation of doubly linked circular lists, I've found following macro:
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr -…

Tomas Pruzina
- 8,397
- 6
- 26
- 39
17
votes
4 answers
Boolean multiplication in c++?
Consider the following:
inline unsigned int f1(const unsigned int i, const bool b) {return b ? i : 0;}
inline unsigned int f2(const unsigned int i, const bool b) {return b*i;}
The syntax of f2 is more compact, but do the standard guarantees that f1…

Vincent
- 57,703
- 61
- 205
- 388
16
votes
2 answers
and older browsers
Does trigger standards mode for older browsers as well? Saying "in all modern browsers" isn't very precise.
I am especially interested in IE6.
Thank you.

Francisc
- 77,430
- 63
- 180
- 276
16
votes
3 answers
Tricky CSS Layout
So I am making a website with quite a problematic layout. There are four corner images TL, TR, BL and BR indicated by black blocks. The dark orange area is the main content (to a width of 960px), with the outside area denoted by the green arrow as…

Meep3D
- 3,803
- 4
- 36
- 55
15
votes
2 answers
A Test For HTTP 1.1 Compliance
I wonder if there is a piece of software to allow automatically testing a webserver for compliance with the HTTP protocol? Ideally I'd like this program to work like this: I give it the address and port, it runs a bunch of requests and then outputs…
user500944
15
votes
1 answer
Why is a C++ template accepting an array not more specialized than one accepting a pointer according to GCC 5.3 and Clang 4.0?
Why are the next two template declarations ambiguous (so neither is more specialized than the other)? I know this question has been raised many times on Stack Overflow, but usually, people answer how to resolve ambiguity, not why it's…

Vyacheslav Grigoryev
- 201
- 1
- 5
15
votes
1 answer
Is the compiler allowed to recycle freed pointer variables?
It has been claimed that
a compiler is free to reuse the pointer variable for some other purpose after the realloc being freed, so you have no guarantee that it has the same value as it did before
ie
void *p = malloc(42);
uintptr_t address =…

Christoph
- 164,997
- 36
- 182
- 240
15
votes
8 answers
Difference between scanf() and strtol() / strtod() in parsing numbers
Note: I completely reworked the question to more properly reflect what I am setting the bounty for. Please excuse any inconsistencies with already-given answers this might have created. I did not want to create a new question, as previous answers to…

DevSolar
- 67,862
- 21
- 134
- 209
14
votes
3 answers
multipart/form-data, what is the default charset for fields?
what is the default encoding one should use to decode multipart/form-data if no charset is given? RFC2388 states:
4.5 Charset of text in form data
Each part of a multipart/form-data is supposed to have a content-
type. In the case where a…

Malax
- 9,436
- 9
- 48
- 64
14
votes
3 answers
How to force unsigned arithmetic on fixed-width types?
The following (C99 and newer) code wants to compute a square, restricted to the same number of bits as the original fixed-width type.
#include
uint8_t sqr8( uint8_t x) { return x*x; }
uint16_t sqr16(uint16_t x) { return x*x;…

fgrieu
- 2,724
- 1
- 23
- 53