sawyl: (Default)
[personal profile] sawyl
Today's source of immense irritation: people who use C++ reserved keywords in system header files. For example:

struct florp { int foo; int bar; int using; int baz; } florp_t;

Spot the problem yet?

Luckily, there's a dark and nasty hack to get around the problem. Take a copy of the broken header file, modify it to remove the annoying clash, then add an '#include "florp.h"' at the very start of the source file, so that overloads the broken system header file (assuming that the developers didn't mess up the whole idempotent header file thing as well as the keyword thing). Of course, anything that actually uses the variable is going to fail, but hey, that's tough.

Profile

sawyl: (Default)
sawyl

August 2018

S M T W T F S
   123 4
5 6 7 8910 11
12131415161718
192021222324 25
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 17th, 2026 01:23 pm
Powered by Dreamwidth Studios