IRC logs for #openrisc Thursday, 2014-03-06

--- Log opened Thu Mar 06 00:00:08 2014
stekern'NULL' is overrated, why not just use the more beautiful '0'?04:24
daliasi agree completely04:30
daliasNULL is also misleading because it doesn't have to be defined with pointer type, and even when it is, the type is often not what you want04:31
daliasfor example using NULL in execl is wrong04:31
daliasit needs to be (char *)NULL or (simpler) (char *)004:31
LoneTechNULL is a shoddy workaround for two things: 0 looks like an integer but is defined to parse as nil, and compilers often bark at you if a non-pointer or wrong sort of pointer is passed - except if it's void, because the only use of a void pointer is as an alias for something that makes sense only to other code.09:55
amsdalias: sorry? NULL is always (void*)0 or equivalent09:59
amsand ofcourse using NULL for execl is wrong; it takes two const char *'s, NULL is not const10:00
amsrather the problem is that C is a brain damaged language :-)10:02
LoneTechyep10:03
amsthough wonderful10:05
daliasams, no it's not. it's an implementation-defined null pointer constant15:54
daliaswhich means it's either an integer constant expression with value 0, or such an expression cast to void *15:54
daliasand the const issue you mentioned does not exist15:55
daliaschar * is valid in place of const char * there15:55
olofkI always defines NULL as 1. It makes the code slightly faster, but sometimes less stable15:56
amsdalias: no, wrong.15:57
amsdalias: section 6.3.2.3, An integer constant expression with the value 0, or such an expression cast to type void *, is called a null pointer constant.15:58
ams++olofk15:59
amsdalias: there is nothing implementation defined about it16:00
daliasams, null pointer constant is not implementation-defined16:09
daliasit's very strictly defined16:09
daliasNULL is implementation-defined16:09
daliasit must be a null pointer constant, but it can be any implementation-defined choice of null pointer constant16:10
daliasC99 7.17 Common definitions <stddef.h> paragraph 316:10
dalias"The macros are NULL which expands to an implementation-defined null pointer constant; and ..."16:11
amsdalias: C11 and POSIX make it non-implementation defined.16:11
daliasoh? i'm aware of the additional requirement in posix but not c1116:12
amsgotta run ...16:12
daliasand you're wrong16:13
daliasC11 says the same thing on stddef.h16:13
daliasit's 7.19 now instead of 7.1716:13
daliasbut the text is the same16:13
amsthen maybe i am conflating it with poosix, or one of the tc's16:15
ams<--- not here.16:16
-!- FreezingAlt is now known as FreezingCold19:29
blueCmdolofk: mind blowing amount of answers to your email19:52
blueCmdolofk: a coworker tells us to break it down in patches and just submit it20:08
blueCmdolofk: like one patch to remove the or32 stuff and try to split it up, if it makes sense20:12
olofkugh... I don't feel comfortable with dividing it into feature patches. I hardly know what binutils does21:24
olofkblueCmd: Are you working with an italian guy called Diego, btw?21:24
olofkstekern: What was the state of your FuesSoC sockit port?21:31
blueCmdolofk: i am not21:50
blueCmdolofk: I am working with an italian guy with a first name starting with the letter F21:51
blueCmdolofk: I can probably do a lot of that patch splitting21:52
--- Log closed Fri Mar 07 00:00:09 2014

Generated by irclog2html.py 2.15.2 by Marius Gedminas - find it at mg.pov.lt!