Breaking changes in Visual C++ 2015
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 9 16:50:17 PDT 2015
Contrived example:
// mymod.h
#ifdef UseFloat
extern float x;
#else
extern int x;
#endif
// main.c
#include <stdio.h>
#include "mymod.h"
void main() {
x = 0;
printf("%d\n", x);
}
Compile commands:
gcc -c mymod.c
gcc -c -DUseFloat main.c # <-- oops
gcc main.o mymod.o
The thing is, every day I compile some modules with -unittest, and some without,
and link together together. Even if the ones without -unittest are the linked in
Phobos modules. The autotester does it all day every day, too.
If this didn't work, D's unit tests indeed would be rather useless.
More information about the Digitalmars-d
mailing list