Opened 9 years ago

Closed 9 years ago

#7795 closed bug (fixed)

error when compiling Haiku with gcc4

Reported by: diger Owned by: axeld
Priority: normal Milestone: R1
Component: Network & Internet/IPv6 Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


hrev42345 gcc4

I cant build revision 42390 on gcc4.5.3 with error:

C++ generated/objects/haiku/x86/release/add-ons/kernel/network/protocols/ipv6/ipv6.o
cc1plus: warnings being treated as errors
src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp: In static member function 'static int32 FragmentPacket::NextOffset()':
src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp:102: error: invalid access to non-static data member 'FragmentPacket::fNext'  of NULL object
src/add-ons/kernel/network/protocols/ipv6/ipv6.cpp:102: error: (perhaps the 'offsetof' macro was used incorrectly)

C++ compile the following test case:

#include <iostream>
#include <stddefs.h>

class _C {
  int f1;
  int f2;

int main(int, char**)
  std::cout << offsetof(_C, f1) << std::endl;
  return 0;

Failure occurred after hrev42382

Change History (2)

comment:1 by anevilyak, 9 years ago

Component: Build SystemNetwork & Internet/IPv6
Owner: changed from bonefish to axeld
Status: newassigned

comment:2 by axeld, 9 years ago

Resolution: fixed
Status: assignedclosed

Fixed in hrev42399.

Note: See TracTickets for help on using tickets.