+ /* The minimum and maximum length. The MAXLEN pointer stays unchanged
+ but MINLEN may be cleared during the execution of the function. */
+ tree *minlen = length;
+ tree* const maxlen = length + 1;
Check formatting here. I'm not sure if the formatting standards
explicitly state how to handle the "*" when there's a qualifier between
the type and the object. But please check.
If my regular expressions were right, most code puts the star right
before the const (379 occurrences in .c and .h files under the gcc/
directory not counting the test suite). For example:
gcc/cp/decl.c: const char *const name;
There's quite a bit of code that also puts a space after it (219
occurrences). For example:
gcc/cgraph.h:extern const char * const tls_model_names[];
There are 28 occurrences of the style I used, mostly in function
declarations. For instance:
gcc/cp/mangle.c:decl_is_template_id (const tree decl, tree* const
template_info)
I changed my code to follow with the dominant style.
+ inform (info.fmtloc,
+ "using the range [%qE, %qE] for directive argument",
+ fmtres.argmin, fmtres.argmax);
Don't you need G_ for these messages?
Can you please check the calls to fmtwarn which pass in the string as an
argument and add G_ as needed? I think the cases where the string is
computed into a variable are all handled correctly, it's jut those where
the string appears as a call argument that need double checking. I
think there's ~3 of them.
I found an error() call in c-family/c-format.c with the string split
across two lines like here (see below) and the error message appears
correctly concatenated in the gcc.pot file so I take that to mean
that the G_ isn't necessary here.
error ("found a %<%s%> reference but the format argument should"
" be a string", format_name (gcc_objc_string_format_type));
Other than that, though, since it's an easy mistake to make, it
would be helpful if problems like the one you were worried about
could be detected by some tool run during a build. I wonder how
hard it would be to write an awk scirpt...
+#if 0
...
+#else
...
+#endif
Please remove the #if 0'd code.
Sorry about that. This was left over from my effort to persuade
the substring_loc class to underline just the last quote of the
format string. I thought David had made some changes to make it
possible but I may have misremembered. Let me raise a separate
bug for it.
I think with the nits above fixed, this is OK for the trunk.
Thanks for your patience.
Great, thank you!
Martin