**** BEGIN LOGGING AT Fri Apr 21 09:59:57 2006 Apr 22 00:50:27 any c guru's awake? Apr 22 00:53:12 is that software by any chance Apr 22 00:55:50 hehe yea Apr 22 00:56:53 prpplague: shot Apr 22 00:57:43 ran across the declaration of: Apr 22 00:57:51 const char foo[]; Apr 22 00:58:00 where before i had always used Apr 22 00:58:08 const char *foo; Apr 22 00:58:36 not sure what the difference is Apr 22 00:58:45 none Apr 22 00:58:54 almost Apr 22 00:59:14 key2: odd Apr 22 00:59:21 well there are no difference for me Apr 22 00:59:26 key2: 2.95.3 cross compile complete chokes on it Apr 22 00:59:46 how do u use it ? Apr 22 00:59:54 *foo is a pointer Apr 22 00:59:58 so foo is the adress Apr 22 01:00:05 and *foo the value Apr 22 01:00:12 but depends Apr 22 01:00:38 do u malloc it ? Apr 22 01:00:41 key2: used in a struct declaration Apr 22 01:01:16 short paste Apr 22 01:01:19 1 Apr 22 01:01:20 2 Apr 22 01:01:20 3 Apr 22 01:01:23 struct env_link { Apr 22 01:01:24 unsigned long magic; Apr 22 01:01:24 void* apex_start; Apr 22 01:01:24 void* apex_end; Apr 22 01:01:24 void* env_start; Apr 22 01:01:26 void* env_end; Apr 22 01:01:28 unsigned long env_d_size; Apr 22 01:01:30 const char region[]; Apr 22 01:01:32 }; Apr 22 01:01:51 i can change the const char region[] to const char *region Apr 22 01:01:59 and it compiles clean with 2.95.3 Apr 22 01:03:29 their seems to be a thread on the LKML about the differences Apr 22 01:03:39 but i've not gone through it all yet Apr 22 01:04:13 and if u put const char *region; ? Apr 22 01:04:51 it compiles and runs Apr 22 01:05:09 well that's normal Apr 22 01:05:27 because in a struct const char region[] has no sense Apr 22 01:05:32 since u gotta maloc it Apr 22 01:05:36 it needs the pointer Apr 22 01:05:52 i'm thinking that 3.x gcc is handling it differentl Apr 22 01:05:53 y Apr 22 01:05:58 testing now Apr 22 01:06:01 in the declaration const char region[]; Apr 22 01:06:14 region = something is wrong Apr 22 01:06:30 event tho ®ion would have returned the mem address Apr 22 01:07:28 prpplague: to confirm, test that: const char region[50]; Apr 22 01:07:32 just to see if it complains Apr 22 01:07:37 gotcha Apr 22 01:08:02 key2: yea looks like 3.3.2 builds it with not problem as const char region[] Apr 22 01:09:09 key2: 2.95.3 with region[50] builds clean Apr 22 01:11:24 well thats interesting Apr 22 01:11:32 i'll have to do some more digging on that Apr 22 01:11:40 key2: thanks for the input Apr 22 01:12:08 key2: always nice to have some verify that you aren't insane ( or atleast slight losing your mind) Apr 22 01:12:14 s/some/someone Apr 22 01:15:43 prpplague: talking about me ? :) Apr 22 01:17:09 hehe yea **** ENDING LOGGING AT Sat Apr 22 09:59:56 2006