This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translation/79705] New: cp/decl.c message not marked for translation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79705

            Bug ID: 79705
           Summary: cp/decl.c message not marked for translation
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: translation
          Assignee: unassigned at gcc dot gnu.org
          Reporter: fmarchal at perso dot be
  Target Milestone: ---

In cp/decl.c, inside function check_redeclaration_exception_specification(),
one can find the code below where the "declaration of %qF has a different
exception specifier" text isn't translated but the "from previous declaration
%qF" text following it is translated.

  /* [except.spec]

     If any declaration of a function has an exception-specification,
     all declarations, including the definition and an explicit
     specialization, of that function shall have an
     exception-specification with the same set of type-ids.  */
  if (! DECL_IS_BUILTIN (old_decl)
      && !comp_except_specs (new_exceptions, old_exceptions, ce_normal))
    {
      const char *msg
        = "declaration of %qF has a different exception specifier";
      bool complained = true;
      location_t new_loc = DECL_SOURCE_LOCATION (new_decl);
      if (DECL_IN_SYSTEM_HEADER (old_decl))
        complained = pedwarn (new_loc, OPT_Wsystem_headers, msg, new_decl);
      else if (!flag_exceptions)
        /* We used to silently permit mismatched eh specs with
           -fno-exceptions, so make them a pedwarn now.  */
        complained = pedwarn (new_loc, OPT_Wpedantic, msg, new_decl);
      else
        error_at (new_loc, msg, new_decl);
      if (complained)
        inform (DECL_SOURCE_LOCATION (old_decl),
                "from previous declaration %qF", old_decl);
    }

Either translate both or translate none. I guess they should be both
translated.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]