Dear List, Eric Blake wrote: > your check for sigsetjmp was violating > POSIX and creating an invalid C program (you can't take the address of an > array, only an array element).
The patch looks correct to me - the correct type of the parameter is "pointer to the element type of the array type sigjmp_buf". The statement about array addresses, however, is certainly wrong. Of course one can take the address of an array! One can take the address of any object not explicitly declared with storage-class "register". Mr. Blake perhaps suspects that there is a discrepancy in the depth of referencing (sometype * vs. sometype **). His line about "not taking the address of an array" suggests strongly that he thinks there is, and that "&bf" must be a pointer to some mysterious, floating, address-less reference to the array. In fact, it's merely a pointer to the array, with no intermediate anything. The address of the first element of the sigjump_buf array (which is what will be passed if "bf" is used) is necessarily the same as the address of the array as a whole (which will be passed if "&bf" is used). C requires this: one MUST be able to get at the members of an array by indexing! There's a certain amount of freedom in deciding how to represent pointers internally, but I don't believe that it extends to giving different pointer representations for &bf and &bf[0], even though they are of different types. If the compiler doesn't actually gag at the point where the call is made (and the patch is applied) the effect is the same. The compiler is not required to gag, and in my experience compilers will only do so if all warnings are treated as errors. Of course, if the argument ever reaches sigsetjmp() , it will be implicitly coerced to whatever type sigsetjmp() expects. Bernard Leak. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Autogen-users mailing list Autogen-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/autogen-users