add -pedantic-errors to g++ compile flags