Re: gfortran using libcpp/internal.h (was Re: [C++ Patch] PR 50956)

2011-11-03 Thread Richard Guenther
On Thu, Nov 3, 2011 at 4:03 PM, Daniel Franke wrote: > 2011/11/3 Richard Guenther : >> On Thu, Nov 3, 2011 at 3:46 PM, Jason Merrill wrote: >>> On 11/03/2011 09:51 AM, Tom Tromey wrote: > > "Paolo" == Paolo Carlini  writes: Paolo>  By the way, I have no idea why I didn't

Re: gfortran using libcpp/internal.h (was Re: [C++ Patch] PR 50956)

2011-11-03 Thread Richard Guenther
On Thu, Nov 3, 2011 at 3:46 PM, Jason Merrill wrote: > On 11/03/2011 09:51 AM, Tom Tromey wrote: >>> >>> "Paolo" == Paolo Carlini  writes: >> >> Paolo>  By the way, I have no idea why I didn't see it, only Fortran >> includes >> Paolo>  [internal.h] in the *libcpp* directory? Anyway, I'm p

gfortran using libcpp/internal.h (was Re: [C++ Patch] PR 50956)

2011-11-03 Thread Jason Merrill
On 11/03/2011 09:51 AM, Tom Tromey wrote: "Paolo" == Paolo Carlini writes: Paolo> By the way, I have no idea why I didn't see it, only Fortran includes Paolo> [internal.h] in the *libcpp* directory? Anyway, I'm proceeding to Paolo> bootstrap the attached. It really isn't ok to do this. Th

Re: [C++ Patch] PR 50956

2011-11-03 Thread Paolo Carlini
Hi, > It really isn't ok to do this. That header is supposedly private to > libcpp. Eh, eh looks like somebody wandered around and found a few handy helper functions ;) > Paolo

Re: [C++ Patch] PR 50956

2011-11-03 Thread Tom Tromey
> "Paolo" == Paolo Carlini writes: Paolo> By the way, I have no idea why I didn't see it, only Fortran includes Paolo> that header in the *libcpp* directory? Anyway, I'm proceeding to Paolo> bootstrap the attached. It really isn't ok to do this. That header is supposedly private to libcpp.

Re: [C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
this actually. Paolo. / Index: internal.h === --- internal.h (revision 180785) +++ internal.h (working copy) @@ -739,8 +739,8 @@ static inline int ustrncmp (const unsigned char *, const unsigned char *,

Re: [C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
On 11/02/2011 08:44 PM, Paolo Carlini wrote: On 11/02/2011 08:12 PM, Jason Merrill wrote: Another bootstrap issue: In file included from /home/jason/src/trunk/gcc/fortran/cpp.c:35:0: /home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h: In function ‘unsigned char* ustrchr(const unsigned c

Re: [C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
On 11/02/2011 08:12 PM, Jason Merrill wrote: Another bootstrap issue: In file included from /home/jason/src/trunk/gcc/fortran/cpp.c:35:0: /home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h: In function ‘unsigned char* ustrchr(const unsigned char*, int)’: /home/jason/src/trunk/gcc/fortran

Re: [C++ Patch] PR 50956

2011-11-02 Thread Jason Merrill
Another bootstrap issue: In file included from /home/jason/src/trunk/gcc/fortran/cpp.c:35:0: /home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h: In function ‘unsigned char* ustrchr(const unsigned char*, int)’: /home/jason/src/trunk/gcc/fortran/../../libcpp/internal.h:782:55: error: cast

Re: [C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
On 11/02/2011 07:26 PM, Jason Merrill wrote: On 11/02/2011 01:45 PM, Paolo Carlini wrote: ... ehm, we use -Wcast-qual during the bootstrap, thus if I don't want to break it again, better doing the below too. Seems obvious, by itself. Yep. Great, all done. Note for the accidental reader: it's in

Re: [C++ Patch] PR 50956

2011-11-02 Thread Jason Merrill
On 11/02/2011 01:45 PM, Paolo Carlini wrote: ... ehm, we use -Wcast-qual during the bootstrap, thus if I don't want to break it again, better doing the below too. Seems obvious, by itself. Yep. Jason

Re: [C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
... ehm, we use -Wcast-qual during the bootstrap, thus if I don't want to break it again, better doing the below too. Seems obvious, by itself. Paolo. // 2011-11-02 Paolo Carlini PR c++/50956 * builtins.c (fold_builtin_memchr): Fix cast. Index: builtins.c =

Re: [C++ Patch] PR 50956

2011-11-02 Thread Jason Merrill
OK. Jason

[C++ Patch] PR 50956

2011-11-02 Thread Paolo Carlini
Hi, this should restore -Wcast-qual to the 3.4.x (!) behavior, more or less. The diff seems large but the new code is essentially in the last 5 lines. When fixing this issue the most subtle existing testcase to get right, IMHO, is c-c++-common/Wcast-qual-1.c. Duplicate warnings should not be