[haiku-bugs] Re: [Haiku] #12515: can't build Haiku within haiku.

  • From: "jessicah" <trac@xxxxxxxxxxxx>
  • Date: Wed, 11 Jan 2017 17:56:07 -0000

#12515: can't build Haiku within haiku.
-------------------------+----------------------------
   Reporter:  khallebal  |      Owner:  nobody
       Type:  bug        |     Status:  new
   Priority:  normal     |  Milestone:  Unscheduled
  Component:  - General  |    Version:  R1/Development
 Resolution:             |   Keywords:
 Blocked By:             |   Blocking:  13103
Has a Patch:  1          |   Platform:  x86
-------------------------+----------------------------

Comment (by jessicah):

 Hmm, a quick test with doing a trivial copy of a struct, even with -Wall
 -Werror, gcc doesn't complain about copying a struct using the format that
 gawk is using, and has the expected output of the copy being identical.

 {{{
 #include <stdio.h>
 #include <string.h>

 typedef struct s {
         int a;
         int b;
         int c;
         int d;
         int e;
         int f;
 } s;

 int main(void)
 {
         s current;
         current.a = 42; current.b = 55; current.c = 7; current.d = -5;
 current.e = 63; current.f = -402;
         s tmp = current;
         printf("%d %d %d %d %d %d\n", tmp.a, tmp.b, tmp.c, tmp.d, tmp.e,
 tmp.f);
         printf("equal = %s\n", memcmp(&current, &tmp, sizeof(s)) == 0 ?
 "yes" : "no");
         return 0;
 }
 }}}

 {{{
 d$ ./test
 42 55 7 -5 63 -402
 equal = yes
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/12515#comment:28>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: