The parser appears to contain calls to diagnostic functions, so seems a 
good point to comment on conventions for diagnostics in GCC:

* Please send all diagnostics (except maybe internal ones that indicate a 
bug in the compiler) through the language-independent diagnostic 
machinery.  It appears you're using e.g. the <err.h> functions (glibc and 
BSD) at present.

* If you need custom diagnostic functions that wrap that machinery, please 
make sure those follow the parameter naming conventions required for 
messages to be extracted for translation; see ABOUT-GCC-NLS for details 
(and other requirements such as using complete sentences rather than 
building them up from pieces).  (Note also that if you have overloaded 
diagnostic functions with the same name, the parameter extracted for 
translation must be in the same position for all overloads.)

* Once everything is going through appropriate diagnostic machinery, 
please make sure that po/exgettext really does extract all the diagnostics 
for translation.  In particular, note that it doesn't process .y files at 
present, and it would be best not to require 
--enable-generated-files-in-srcdir for it to process a generated .c file.  
(My suggestion would be to move all the logic that generates diagnostics 
out of parser actions into separate .cc files.)

-- 
Joseph S. Myers
josmy...@redhat.com

Reply via email to