On Tue, 11 Nov 2014, Marek Polacek wrote:

> > >>+  if (fieldlist == NULL_TREE)
> > >>+    {
> > >>+      warning_at (record_loc, OPT_Wc___compat,
> > >>+           "empty %s has size 0 in C, 1 in C++",
> > >>+           (struct_parse_info->code == RECORD_TYPE) ? "struct" : 
> > >>"union");
> > >>+    }
> > >>+
> > >
> > >I think this won't work well wrt translations, so you need to have
> > >an if here.  See the pedwarns at the beginning of finish_struct.
> > 
> > Do keywords like struct/union really require translation?
> 
> C keywords don't require translation, but you always need to have
> complete sentences in diagnostics so I better pointed it out.  Joseph
> would know better than me though.

The situation where the above code would cause problems for translation is 
a language where "struct" and "union" have different grammatical gender 
and the translation of some other bit of the sentence ("empty" or "has") 
needs to agree with that gender.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to