This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Emit warning for function declaration with qualified void return type



On Jan 4, 2005, at 2:45 PM, Devang Patel wrote:



On Jan 4, 2005, at 11:41 AM, Andrew Pinski wrote:


Would it not be better if we write this block of code like:
if (really_funcdef || flag_isoc99)
	pedwarn ("function definition has qualified void return type");

Decreasing the number of times this is repeated and also makes the code
a little more readable?

I do not think your suggestion makes significant change readability of code.


Plus it helps user to clearly understand whether warning is about function
definition or function declaration. If GCC can identify precisely whether
it is a def. or not then why not be more helpful to user?

Oh, I should have read the message more closely sorry about. I thought the error messages were the same (they look very close which is why I got confused).

Sorry about that,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]