[ELDK] Suppress warning: #pragma once is obsolete

Rodrigo Ribeiro Gurgel do Amaral rodrigo.amaral at autotrac.com.br
Mon Sep 26 20:12:27 CEST 2011


Sorry about the 

	This message and any attachment are confidential information for the

The project is already with #ifdef, but it's kind of dirt, and pragma avoids messing up with repeated CLASS_NAME on ifdefs.
I think that the problem with prama once in old compilers is when you have 2 links to the same file, and that I can control.
So if I could suppress this specific warning...
But if is there more implications (like the pragma is completely ignored) than the 'two links bug' I'll put it aside.

Obs.: The 'crap message' will be appended again, please, ignore it. I can't configure other mails on my network, but I'll try to handle it. Just for now, just for this thread, please, ignore the 'crap part'.

Reference:
If the compiler makes a mistake, for example by failing to recognize that two symbolic links with different names point to the same file, then the compilation will fail.
on
http://en.wikipedia.org/wiki/Pragma_once


Thanks,
Rodrigo Ribeiro Gurgel do Amaral
Brasília - Brasil.

Em 26-09-2011 14:42, Wolfgang Denk escreveu: 

	Dear "Rodrigo Ribeiro Gurgel do Amaral",
	
	In message <4E80AB50.4030308 at autotrac.com.br> <mailto:4E80AB50.4030308 at autotrac.com.br>  you wrote:

		
		     Does anyone know how to suppres the #pragma once warning "#pragma 
		once is obsolete"? I'm trying  -Wno-deprecated 
		-Wno-deprecated-declarations, but no results.

	
	The proper fix is to replace the non-standard "#pragma once" clauses by
	standard #include guards.
	

		     Unfortunately I can't upgrade my 3.1.1 for now.
		     Is there a more elegant solution than a 'grep -v' ?

	
	grep -v will probably not do what you expect - it is likely to trigeer
	other errors due to muliple inclusions.
	

		Esta mensagem e qualquer anexo a ela são documentos confidenciais e

	...

		This message and any attachment are confidential information for the

	...
	
	Please STOP posting such nonsense on public mailing lists.  If you
	cannot switch it off in your company, then use any free mail account
	that does not add such crap.
	
	Thanks.
	
	Best regards,
	
	Wolfgang Denk
	


Esta mensagem e qualquer anexo a ela são documentos confidenciais e direcionados exclusivamente ao(s) destinatário(s). Qualquer uso, desvio, sonegação, supressão, revelação ou divulgação não autorizada é proibida e sujeita às sanções e/ou reparações legais por ato ilícito (Código Penal, Artigos 151 e 152). Caso não seja um dos destinatários expressamente indicados, por favor entre em contato com o remetente, respondendo este e-mail e destrua quaisquer cópias da mensagem original. Qualquer opinião, crítica ou análise descrita nesta mensagem é de responsabilidade única do remetente, a menos quando estiver explicitamente expresso que seja da empresa remetente.

This message and any attachment are confidential information for the sole use of the intended recipients. Any unauthorized use, deviation, withholdment, suppression, disclosure or distribution is prohibited and is subjected to legal sanctions and/or compensations per illicit act (Penal Code, articles 151 and 152). If you are not one of the intended recipients, please contact the sender by reply e-mail and destroy any copy of the original message. Any view, comment or analysis expressed in this message is sole responsibility from the sender, except when it's specifically expressed that it's the view, comment or analysis of the company.



More information about the eldk mailing list