The pragma once statements cause a lot of warnings in GCC before 3.4.
To avoid these please put the pragma once statements inside an #if.
To keep GCC's optimization for include guards, just move them to the top.
The solution for this looks like this:
#ifndef GUARD
#define GUARD
#if !defined(__GNUC__) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4) || (__GNUC__
>= 4) // GCC supports "pragma once" correctly since 3.4
#pragma once
#endif
...
Original issue reported on code.google.com by matthias...@gmail.com on 12 Jan 2011 at 8:30
Original issue reported on code.google.com by
matthias...@gmail.com
on 12 Jan 2011 at 8:30