octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #60586] type 'yysymbol_kind_t' violates the C+


From: Robert Jenssen
Subject: [Octave-bug-tracker] [bug #60586] type 'yysymbol_kind_t' violates the C++ One Definition Rule'
Date: Tue, 11 May 2021 22:55:23 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:88.0) Gecko/20100101 Firefox/88.0

URL:
  <https://savannah.gnu.org/bugs/?60586>

                 Summary: type 'yysymbol_kind_t' violates the C++ One
Definition Rule'
                 Project: GNU Octave
            Submitted by: morgawr
            Submitted on: Wed 12 May 2021 02:55:21 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Unexpected Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Robert Jenssen
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When compiling hg-id 3e8bc8bee8e9 I get the following warning (edited to
remove highlighting ESC's):

libinterp/parse-tree/oct-parse.cc:475:warning: type 'yysymbol_kind_t' violates
the C++ One Definition Rule 
  475 | enum yysymbol_kind_t
      | 
libinterp/corefcn/oct-tex-parser.cc:238:note: an enum with different value
name is defined in another translation unit
  238 | enum yysymbol_kind_t
      | 
libinterp/parse-tree/oct-parse.cc:481: note: name 'YYSYMBOL_3_ESC' differs
from name 'YYSYMBOL_BF' defined in another translation unit
  481 |   YYSYMBOL_3_ = 3,                         /* '='  */
      | 
libinterp/corefcn/oct-tex-parser.cc:244:note: mismatching definition
  244 |   YYSYMBOL_BF = 3,                         /* BF  */
      | 



So far as I can see the solution is to place the C++ tex parser in a separate
namespace. For example:

%define api.namespace {octave_tex}






    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60586>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]