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

            Bug ID: 122009
           Summary: [16 regression] ODR issues in m2
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: normal
          Priority: P3
         Component: modula2
          Assignee: gaius at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Unfortunately, cobol still isn't compliant with this, so I can't use my usual
-Werror= for now, so I don't know if this is very recent or the last few weeks
instead.

```
m2/gm2-gcc/Gm2type.h:173:13: warning: ‘m2type_BuildEnumerator’ violates the C++
One Definition Rule [-Wodr]
  173 | EXTERN tree m2type_BuildEnumerator (location_t location, char * name,
tree value, tree *enumvalues);
      |             ^
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2type.cc:2216:1:
note: type mismatch in parameter 2
 2216 | m2type_BuildEnumerator (location_t location, const char *name, tree
value,
      | ^
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2type.cc:2216:1:
note: type ‘const char’ should match type ‘char’
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2type.cc:2216:1:
note: ‘m2type_BuildEnumerator’ was previously declared here
m2/gm2-gcc/Gm2statement.h:57:13: warning: ‘m2statement_IfExprJump’ violates the
C++ One Definition Rule [-Wodr]
   57 | EXTERN void m2statement_IfExprJump (location_t location, tree exp, void
* label);
      |             ^
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2statement.cc:750:1:
note: ‘m2statement_IfExprJump’ was previously declared here
  750 | m2statement_IfExprJump (location_t location, tree exp, char *label)
      | ^
m2/gm2-gcc/Gm2expr.h:467:13: warning: ‘m2expr_BuildLogicalOrAddress’ violates
the C++ One Definition Rule [-Wodr]
  467 | EXTERN tree m2expr_BuildLogicalOrAddress (location_t location, tree
op1, tree op2, bool needconvert);
      |             ^
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2expr.cc:2891:1:
note: type mismatch in parameter 4
 2891 | m2expr_BuildLogicalOrAddress (location_t location, tree op1, tree op2)
      | ^
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2expr.cc:2891:1:
note: type ‘void’ should match type ‘bool’
/var/tmp/portage/sys-devel/gcc-16.0.9999/work/gcc-16.0.9999/gcc/m2/gm2-gcc/m2expr.cc:2891:1:
note: ‘m2expr_BuildLogicalOrAddress’ was previously declared here
```

Reply via email to