This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] PR6321
Dirk Mueller wrote:
On Monday, 30. October 2006 04:23, Mark Mitchell wrote:
The idea of this patch is fine, but the function name main_args_warning
isn't very good. Please use "check_type_of_main" instead.
$ grep " check_" c-common.h | wc -l
$ grep "_warning" c-common.h | wc -l
I'm not impressed. :-) It's not a big enough sample to prove much about
consistency. This function does things, so it should have an active
verb-ish name. "main_args_warning" is the name of a variable, IMO.
I don't want to argue, but the function doesn't actually check the (return)
type of the function. How about "check_main_arguments"
or "check_main_function_arguments" ?
From your patch:
+ if (TYPE_MAIN_VARIANT (TREE_TYPE (TREE_TYPE (decl)))
+ != integer_type_node)
+ pedwarn ("return type of %q+D is not %<int%>", decl);
(650) 331-3385 x713