On 07/14/2016 05:11 PM, Georg-Johann Lay wrote:
The hook allows better diagnostics: The address spaces are registered with c_register_addr_space and if the parser comes across an address space it provides the hook with the needed information, in particular the location of the token so that the message would be something like
Looks reasonable, except...
+(diagnose_usage, + "Define this hook if the availability of an address space depends on\n\ +command line options and some diagnostics shall be printed when the\n\
"should", not "shall", I think.
+bool +default_addr_space_diagnose_usage (addr_space_t ARG_UNUSED (as), + location_t ARG_UNUSED (loc)) +{ + return false; +}
The return value is not used, so it should return void. That would also match the documentation you added (which says "does nothing" rather than "returns false").
Remove unused arg names in default hook implementations, I think. Bernd