Hello, While examining the source code for make, I see something suspicious with a const pointer. Line 3094 of read.c is: char *userend = strchr (name + 1, '/'); The name parameter is a const pointer, so the overloaded version of strchr that takes a const pointer as the first parameter should also return a const pointer. But userend is not a const pointer and is used to modify the string later in the code. I’m a bit surprised the compiler allows this and I realize this could just be a misunderstanding of something on my part. Does anyone else find this construct suspicious? Thanks, Joe Sent from Mail for Windows |
- Invalid use of const pointer? Joe Filion
- Re: Invalid use of const pointer? Paul Smith
- Re: Invalid use of const pointer? Henrik Carlqvist
- Re: Invalid use of const pointer? Paul Smith
- Re: Invalid use of const pointer? Henrik Carlqvist
- Re: Invalid use of const pointer? Paul Smith
- Re: Invalid use of const pointe... Henrik Carlqvist
- Re: Invalid use of const po... Paul Smith
- Re: Invalid use of const po... Henrik Carlqvist
- Re: Invalid use of const po... Edward Welbourne
- Re: Invalid use of const po... Paul Smith