Skip to content

Compilation errors with gcc 14.1.0 #55

@dschepler

Description

@dschepler
...
Making all in cryptlib
make[3]: Entering directory '/home/unfrobbed-dev/pkgs-broken/tripwire/tripwire-2.4.3.7/debian/obj-amd64/src/cryptlib'
g++ -DHAVE_CONFIG_H                -I.. -I../..   -O -pipe -Wall -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Wextra -Wno-unused-parameter -c -o integer.o ../../../../src/cryptlib/integer.cpp
../../../../src/cryptlib/integer.cpp: In function 'void MontgomeryReduce(word*, word*, const word*, const word*, const word*, unsigned int)':
../../../../src/cryptlib/integer.cpp:745:14: warning: unused variable 'carry' [-Wunused-variable]
  745 |         word carry = Add(R, R, M, N);
      |              ^~~~~
../../../../src/cryptlib/integer.cpp: In function 'void CorrectQuotientEstimate(word*, word*, word&, word&, const word*, unsigned int)':
../../../../src/cryptlib/integer.cpp:905:10: warning: unused variable 'borrow' [-Wunused-variable]
  905 |     word borrow = Subtract(R, R, T, N+2);
      |          ^~~~~~
../../../../src/cryptlib/integer.cpp: At global scope:
../../../../src/cryptlib/integer.cpp:1162:24: error: reference to 'byte' is ambiguous
 1162 | Integer::Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s)
      |                        ^~~~
In file included from /usr/include/c++/14.1.0/bits/memory_resource.h:38,
                 from /usr/include/c++/14.1.0/string:67,
                 from ../../../../src/cryptlib/cryptlib.h:11,
                 from ../../../../src/cryptlib/integer.h:4,
                 from ../../../../src/cryptlib/integer.cpp:4:
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
In file included from ../../../../src/cryptlib/pch.h:4,
                 from ../../../../src/cryptlib/integer.cpp:3:
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1162:1: error: no declaration matches 'Integer::Integer(const int*, unsigned int, Signedness)'
 1162 | Integer::Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s)
      | ^~~~~~~
../../../../src/cryptlib/integer.h:305:5: note: candidates are: 'Integer::Integer(word, unsigned int)'
  305 |     Integer(word value, unsigned int length);
      |     ^~~~~~~
../../../../src/cryptlib/integer.h:83:9: note:                 'Integer::Integer(RandomNumberGenerator&, const Integer&, const Integer&, RandomNumberType)'
   83 |         Integer(RandomNumberGenerator &rng, const Integer &min, const Integer &max, RandomNumberType rnType=ANY);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:75:9: note:                 'Integer::Integer(RandomNumberGenerator&, unsigned int)'
   75 |         Integer(RandomNumberGenerator &rng, unsigned int bitcount);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:71:9: note:                 'Integer::Integer(BufferedTransformation&)'
   71 |         Integer(BufferedTransformation &bt);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:68:9: note:                 'Integer::Integer(const byte*)'
   68 |         Integer(const byte *BEREncodedInteger);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:65:9: note:                 'Integer::Integer(const byte*, unsigned int, Signedness)'
   65 |         Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s=UNSIGNED);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:62:9: note:                 'Integer::Integer(const char*)'
   62 |         Integer(const char *str);
      |         ^~~~~~~
../../../../src/cryptlib/integer.cpp:1134:1: note:                 'Integer::Integer(long int)'
 1134 | Integer::Integer(long value)
      | ^~~~~~~
../../../../src/cryptlib/integer.cpp:1128:1: note:                 'Integer::Integer(const Integer&)'
 1128 | Integer::Integer(const Integer& t)
      | ^~~~~~~
../../../../src/cryptlib/integer.cpp:1122:1: note:                 'Integer::Integer()'
 1122 | Integer::Integer()
      | ^~~~~~~
../../../../src/cryptlib/integer.h:16:7: note: 'class Integer' defined here
   16 | class Integer
      |       ^~~~~~~
../../../../src/cryptlib/integer.cpp:1167:24: error: reference to 'byte' is ambiguous
 1167 | Integer::Integer(const byte *BEREncodedInteger)
      |                        ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1167:1: error: no declaration matches 'Integer::Integer(const int*)'
 1167 | Integer::Integer(const byte *BEREncodedInteger)
      | ^~~~~~~
../../../../src/cryptlib/integer.h:305:5: note: candidates are: 'Integer::Integer(word, unsigned int)'
  305 |     Integer(word value, unsigned int length);
      |     ^~~~~~~
../../../../src/cryptlib/integer.h:83:9: note:                 'Integer::Integer(RandomNumberGenerator&, const Integer&, const Integer&, RandomNumberType)'
   83 |         Integer(RandomNumberGenerator &rng, const Integer &min, const Integer &max, RandomNumberType rnType=ANY);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:75:9: note:                 'Integer::Integer(RandomNumberGenerator&, unsigned int)'
   75 |         Integer(RandomNumberGenerator &rng, unsigned int bitcount);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:71:9: note:                 'Integer::Integer(BufferedTransformation&)'
   71 |         Integer(BufferedTransformation &bt);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:68:9: note:                 'Integer::Integer(const byte*)'
   68 |         Integer(const byte *BEREncodedInteger);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:65:9: note:                 'Integer::Integer(const byte*, unsigned int, Signedness)'
   65 |         Integer(const byte *encodedInteger, unsigned int byteCount, Signedness s=UNSIGNED);
      |         ^~~~~~~
../../../../src/cryptlib/integer.h:62:9: note:                 'Integer::Integer(const char*)'
   62 |         Integer(const char *str);
      |         ^~~~~~~
../../../../src/cryptlib/integer.cpp:1134:1: note:                 'Integer::Integer(long int)'
 1134 | Integer::Integer(long value)
      | ^~~~~~~
../../../../src/cryptlib/integer.cpp:1128:1: note:                 'Integer::Integer(const Integer&)'
 1128 | Integer::Integer(const Integer& t)
      | ^~~~~~~
../../../../src/cryptlib/integer.cpp:1122:1: note:                 'Integer::Integer()'
 1122 | Integer::Integer()
      | ^~~~~~~
../../../../src/cryptlib/integer.h:16:7: note: 'class Integer' defined here
   16 | class Integer
      |       ^~~~~~~
../../../../src/cryptlib/integer.cpp:1244:1: error: reference to 'byte' is ambiguous
 1244 | byte Integer::GetByte(unsigned int n) const
      | ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1252:39: error: reference to 'byte' is ambiguous
 1252 | void Integer::SetByte(unsigned int n, byte value)
      |                                       ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1252:39: error: 'byte' has not been declared
 1252 | void Integer::SetByte(unsigned int n, byte value)
      |                                       ^~~~
../../../../src/cryptlib/integer.cpp:1252:6: error: no declaration matches 'void Integer::SetByte(unsigned int, int)'
 1252 | void Integer::SetByte(unsigned int n, byte value)
      |      ^~~~~~~
../../../../src/cryptlib/integer.h:181:14: note: candidate is: 'void Integer::SetByte(unsigned int, byte)'
  181 |         void SetByte(unsigned int n, byte value);
      |              ^~~~~~~
../../../../src/cryptlib/integer.h:16:7: note: 'class Integer' defined here
   16 | class Integer
      |       ^~~~~~~
../../../../src/cryptlib/integer.cpp:1363:28: error: reference to 'byte' is ambiguous
 1363 | void Integer::Decode(const byte *input, unsigned int inputLen, Signedness s)
      |                            ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1363:6: error: no declaration matches 'void Integer::Decode(const int*, unsigned int, Signedness)'
 1363 | void Integer::Decode(const byte *input, unsigned int inputLen, Signedness s)
      |      ^~~~~~~
../../../../src/cryptlib/integer.h:164:14: note: candidate is: 'void Integer::Decode(const byte*, unsigned int, Signedness)'
  164 |         void Decode(const byte *input, unsigned int inputLen, Signedness=UNSIGNED);
      |              ^~~~~~
../../../../src/cryptlib/integer.h:16:7: note: 'class Integer' defined here
   16 | class Integer
      |       ^~~~~~~
../../../../src/cryptlib/integer.cpp:1398:14: error: 'unsigned int Integer::Encode' is not a static data member of 'class Integer'
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |              ^~~~~~~
../../../../src/cryptlib/integer.cpp:1398:30: error: reference to 'byte' is ambiguous
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |                              ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1398:36: error: 'output' was not declared in this scope
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |                                    ^~~~~~
../../../../src/cryptlib/integer.cpp:1398:44: error: expected primary-expression before 'unsigned'
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |                                            ^~~~~~~~
../../../../src/cryptlib/integer.cpp:1398:79: error: expected primary-expression before 'signedness'
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |                                                                               ^~~~~~~~~~
../../../../src/cryptlib/integer.cpp:1398:89: error: expression list treated as compound expression in initializer [-fpermissive]
 1398 | unsigned int Integer::Encode(byte *output, unsigned int outputLen, Signedness signedness) const
      |                                                                                         ^
../../../../src/cryptlib/integer.cpp:1415:14: error: 'unsigned int Integer::DEREncode' is not a static data member of 'class Integer'
 1415 | unsigned int Integer::DEREncode(byte *output) const
      |              ^~~~~~~
../../../../src/cryptlib/integer.cpp:1415:33: error: reference to 'byte' is ambiguous
 1415 | unsigned int Integer::DEREncode(byte *output) const
      |                                 ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1415:39: error: 'output' was not declared in this scope
 1415 | unsigned int Integer::DEREncode(byte *output) const
      |                                       ^~~~~~
../../../../src/cryptlib/integer.cpp:1438:31: error: reference to 'byte' is ambiguous
 1438 | void Integer::BERDecode(const byte *input)
      |                               ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1438:6: error: no declaration matches 'void Integer::BERDecode(const int*)'
 1438 | void Integer::BERDecode(const byte *input)
      |      ^~~~~~~
../../../../src/cryptlib/integer.h:169:14: note: candidates are: 'void Integer::BERDecode(BufferedTransformation&)'
  169 |         void BERDecode(BufferedTransformation &bt);
      |              ^~~~~~~~~
../../../../src/cryptlib/integer.h:167:14: note:                 'void Integer::BERDecode(const byte*)'
  167 |         void BERDecode(const byte *input);
      |              ^~~~~~~~~
../../../../src/cryptlib/integer.h:16:7: note: 'class Integer' defined here
   16 | class Integer
      |       ^~~~~~~
../../../../src/cryptlib/integer.cpp: In member function 'void Integer::BERDecode(BufferedTransformation&)':
../../../../src/cryptlib/integer.cpp:1459:5: error: reference to 'byte' is ambiguous
 1459 |     byte b;
      |     ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp:1460:17: error: 'b' was not declared in this scope; did you mean 'bt'?
 1460 |     if (!bt.Get(b) || b != INTEGER)
      |                 ^
      |                 bt
../../../../src/cryptlib/integer.cpp: In member function 'void Integer::Randomize(RandomNumberGenerator&, unsigned int)':
../../../../src/cryptlib/integer.cpp:1478:29: error: reference to 'byte' is ambiguous
 1478 |     buf[(unsigned int)0] = (byte)Crop(buf[(unsigned int)0], nbits % 8);
      |                             ^~~~
/usr/include/c++/14.1.0/cstddef:70:14: note: candidates are: 'enum class std::byte'
   70 |   enum class byte : unsigned char {};
      |              ^~~~
../../../../src/cryptlib/config.h:85:23: note:                 'typedef unsigned char byte'
   85 | typedef unsigned char byte;
      |                       ^~~~
../../../../src/cryptlib/integer.cpp: In member function 'Integer& Integer::operator++()':
../../../../src/cryptlib/integer.cpp:1619:14: warning: unused variable 'borrow' [-Wunused-variable]
 1619 |         word borrow = Decrement(reg, reg.size);
      |              ^~~~~~
make[3]: *** [Makefile:386: integer.o] Error 1
make[3]: Leaving directory '/home/unfrobbed-dev/pkgs-broken/tripwire/tripwire-2.4.3.7/debian/obj-amd64/src/cryptlib'
make[2]: *** [Makefile:340: all-recursive] Error 1
make[2]: Leaving directory '/home/unfrobbed-dev/pkgs-broken/tripwire/tripwire-2.4.3.7/debian/obj-amd64/src'
make[1]: *** [Makefile:385: all-recursive] Error 1
make[1]: Leaving directory '/home/unfrobbed-dev/pkgs-broken/tripwire/tripwire-2.4.3.7/debian/obj-amd64'
make: *** [Makefile:326: all] Error 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions