[haiku-commits] Re: buildtools: btrev43122 - legacy/gcc/gcc

  • From: "Adrien Destugues" <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 20 Jul 2017 06:41:05 +0000

20 juillet 2017 07:54 ingo_weinhold@xxxxxx a écrit:

btrev43122 adds 2 changesets to branch 'master'
old head: 259af3cf06a9e75cc93903d6ff4d8cad89f94874
new head: aa5e6148654241454155fd352641bf4b97d53750
overview: 
http://cgit.haiku-os.org/buildtools/log/?qt=range&q=aa5e61486542+%5E259af3cf06a9

----------------------------------------------------------------------------

9167fe74f533: legacy gcc: remove "#pragma once" warning

"#pragma once" is no longer obsolete. In fact it is the preferred header
guard method.


For information: I had checked why this warning was there in gcc2. The reason 
is that the implementation of #pragma once will not work if you include a file 
by multiple names (for example using the real file, then a symlink). The 
"obsolete" warning was removed from gcc when this was fixed.

An alternative is using #import instead of #include (this is standard in 
objective-C but not in C or C++). But it may be affected by the same problem.

We can live with the limitation, anyway. If we can't, there's always the option 
of using a more recent version of cpp and still use gcc2 for compiling.

-- 
Adrien.

Other related posts: