Re: compiler warning w/ Studio & gtk3 GUI

2016-08-24 Fir de Conversatie Bram Moolenaar

Kazunobu Kuriyama wrote:

> 2016-08-24 2:22 GMT+09:00 Danek Duvall :
> 
> > On Tue, Aug 23, 2016 at 06:01:54PM +0900, Kazunobu Kuriyama wrote:
> >
> > > Hi Danek,
> > >
> > > I think that mismatch is not our fault, either.
> >
> > Yeah, that was my thought, but I thought perhaps the Solaris setup was
> > somehow incorrect.  But it really does look like a bug in glib/gtk.  I'll
> > see if I can get a bug filed upstream.
> >
> > > That said, it would take some time to file the issue against them and
> > wait
> > > for their response to that; it would be better for us to do something
> > about
> > > that for ourselves.
> > >
> > > So I made a patch for fixing the issue, which is attached to this mail.
> > >
> > > For that, I assumed that the Solaris Studio had the predefined constant
> > > macro __SUNPRO_C.  Is that assumption OK?
> >
> > Yup, that seems reasonable.  And the patch works just fine -- no more
> > warnings, and the result seems to work just fine.
> >
> 
> Hi Danek,
> 
> Thanks!
> 
> 
> Bram, I attached an updated patch to this mail.  The previous patch has
> wrong indentation and superfluous parentheses.  The new patch fixes them.

Thanks, I'll check it out soon.

> > > If that's OK, could you try the patch to check if it works as expected?
> > >
> > > Note that the patch includes some minor fixes on coding style, too.
> > >
> > >
> > > > glib is 2.46, gtk3 is 3.18.
> > > >
> > > > I don't see this in the travis logs, but I can't tell from there what
> > > > versions of glib and gtk are in use.
> > > >
> > > > Does this look familiar to anyone?
> > >
> > > I didn't see either clang or gcc (generic one, not the one which is a
> > > symbolic link to clang) giving me any warning on the mismatch.  I didn't
> > > know about that until I read you report.
> >
> > Yeah; I wonder if gcc would show that with some more -W flags thrown in
> > there.
> 
> 
> I thought gcc had such a flag, but I've not found one in the manual yet...
> 
> 
> > I guess I'm a bit surprised that clang didn't show it; I thought it
> > did a better job of finding bad code.  I guess that's why we try to have a
> > diverse bundle of compilers.  :)
> >
> 
> Indeed.  And I envy you for the compiler :)

-- 
hundred-and-one symptoms of being an internet addict:
61. Your best friends know your e-mail address, but neither your phone number
nor the address where you live.

 /// Bram Moolenaar -- b...@moolenaar.net -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: compiler warning w/ Studio & gtk3 GUI

2016-08-24 Fir de Conversatie Danek Duvall
On Wed, Aug 24, 2016 at 07:09:01PM +0900, Kazunobu Kuriyama wrote:

> > I guess I'm a bit surprised that clang didn't show it; I thought it did
> > a better job of finding bad code.  I guess that's why we try to have a
> > diverse bundle of compilers.  :)
> 
> Indeed.  And I envy you for the compiler :)

It's available for free for production use on Linux, too:


http://www.oracle.com/technetwork/server-storage/developerstudio/downloads/index.html

though AFAIK you don't get any support whatsoever, not even patches.

Danek

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: compiler warning w/ Studio & gtk3 GUI

2016-08-24 Fir de Conversatie Kazunobu Kuriyama
2016-08-24 2:22 GMT+09:00 Danek Duvall :

> On Tue, Aug 23, 2016 at 06:01:54PM +0900, Kazunobu Kuriyama wrote:
>
> > Hi Danek,
> >
> > I think that mismatch is not our fault, either.
>
> Yeah, that was my thought, but I thought perhaps the Solaris setup was
> somehow incorrect.  But it really does look like a bug in glib/gtk.  I'll
> see if I can get a bug filed upstream.
>
> > That said, it would take some time to file the issue against them and
> wait
> > for their response to that; it would be better for us to do something
> about
> > that for ourselves.
> >
> > So I made a patch for fixing the issue, which is attached to this mail.
> >
> > For that, I assumed that the Solaris Studio had the predefined constant
> > macro __SUNPRO_C.  Is that assumption OK?
>
> Yup, that seems reasonable.  And the patch works just fine -- no more
> warnings, and the result seems to work just fine.
>

Hi Danek,

Thanks!


Bram, I attached an updated patch to this mail.  The previous patch has
wrong indentation and superfluous parentheses.  The new patch fixes them.


> > If that's OK, could you try the patch to check if it works as expected?
> >
> > Note that the patch includes some minor fixes on coding style, too.
> >
> >
> > > glib is 2.46, gtk3 is 3.18.
> > >
> > > I don't see this in the travis logs, but I can't tell from there what
> > > versions of glib and gtk are in use.
> > >
> > > Does this look familiar to anyone?
> >
> > I didn't see either clang or gcc (generic one, not the one which is a
> > symbolic link to clang) giving me any warning on the mismatch.  I didn't
> > know about that until I read you report.
>
> Yeah; I wonder if gcc would show that with some more -W flags thrown in
> there.


I thought gcc had such a flag, but I've not found one in the manual yet...


> I guess I'm a bit surprised that clang didn't show it; I thought it
> did a better job of finding bad code.  I guess that's why we try to have a
> diverse bundle of compilers.  :)
>

Indeed.  And I envy you for the compiler :)

>
> Thanks,
> Danek
>

Best regards,
Kazunobu

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


solaris-studio-gtk3-warning-updated.patch
Description: Binary data


Re: compiler warning w/ Studio & gtk3 GUI

2016-08-23 Fir de Conversatie Danek Duvall
On Tue, Aug 23, 2016 at 06:01:54PM +0900, Kazunobu Kuriyama wrote:

> Hi Danek,
> 
> I think that mismatch is not our fault, either.

Yeah, that was my thought, but I thought perhaps the Solaris setup was
somehow incorrect.  But it really does look like a bug in glib/gtk.  I'll
see if I can get a bug filed upstream.

> That said, it would take some time to file the issue against them and wait
> for their response to that; it would be better for us to do something about
> that for ourselves.
> 
> So I made a patch for fixing the issue, which is attached to this mail.
> 
> For that, I assumed that the Solaris Studio had the predefined constant
> macro __SUNPRO_C.  Is that assumption OK?

Yup, that seems reasonable.  And the patch works just fine -- no more
warnings, and the result seems to work just fine.

> If that's OK, could you try the patch to check if it works as expected?
> 
> Note that the patch includes some minor fixes on coding style, too.
> 
> 
> > glib is 2.46, gtk3 is 3.18.
> >
> > I don't see this in the travis logs, but I can't tell from there what
> > versions of glib and gtk are in use.
> >
> > Does this look familiar to anyone?
> 
> I didn't see either clang or gcc (generic one, not the one which is a
> symbolic link to clang) giving me any warning on the mismatch.  I didn't
> know about that until I read you report.

Yeah; I wonder if gcc would show that with some more -W flags thrown in
there.  I guess I'm a bit surprised that clang didn't show it; I thought it
did a better job of finding bad code.  I guess that's why we try to have a
diverse bundle of compilers.  :)

Thanks,
Danek

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: compiler warning w/ Studio & gtk3 GUI

2016-08-23 Fir de Conversatie Kazunobu Kuriyama
2016-08-23 4:45 GMT+09:00 Danek Duvall :

> I'm seeing these warnings when building on Solaris with the Studio
> compilers.
>
> "gui_gtk_f.c", line 507: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
> "gui_gtk_f.c", line 510: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
> "gui_gtk_f.c", line 795: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
> "gui_gtk_f.c", line 797: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
> "gui_beval.c", line 522: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
> "gui_beval.c", line 536: warning: argument #6 is incompatible with
> prototype:
> prototype: pointer to void : 
> "/usr/include/glib-2.0/gobject/gsignal.h",
> line 431
> argument : pointer to function(void) returning void
>
> Frankly, it seems like it's a gtk/glib mismatch, since all the mechanism
> comes from those headers: GTK_SIGNAL_FUNC is G_CALLBACK, which just casts
> its argument to GCallback, which is the function pointer mentioned above,
> while the function prototype for gtk_signal_disconnect_by_func() takes a
> gpointer, which is the void *.
>

Hi Danek,

I think that mismatch is not our fault, either.

It looks strange that gtk/glib relies on an implicit conversion from a
pointer to function types to the generic pointer of object types, which is
not necessarily guaranteed to work on every platform.

That said, it would take some time to file the issue against them and wait
for their response to that; it would be better for us to do something about
that for ourselves.

So I made a patch for fixing the issue, which is attached to this mail.

For that, I assumed that the Solaris Studio had the predefined constant
macro __SUNPRO_C.  Is that assumption OK?

If that's OK, could you try the patch to check if it works as expected?

Note that the patch includes some minor fixes on coding style, too.


> glib is 2.46, gtk3 is 3.18.
>
> I don't see this in the travis logs, but I can't tell from there what
> versions of glib and gtk are in use.
>
> Does this look familiar to anyone?
>

I didn't see either clang or gcc (generic one, not the one which is a
symbolic link to clang) giving me any warning on the mismatch.  I didn't
know about that until I read you report.

Best regards,
Kazunobu

>
> Thanks,
> Danek
>
> --
> --
> You received this message from the "vim_dev" maillist.
> Do not top-post! Type your reply below the text you are replying to.
> For more information, visit http://www.vim.org/maillist.php
>
> ---
> You received this message because you are subscribed to the Google Groups
> "vim_dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to vim_dev+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


solaris-studio-gtk3-warnings.patch
Description: Binary data


compiler warning w/ Studio & gtk3 GUI

2016-08-22 Fir de Conversatie Danek Duvall
I'm seeing these warnings when building on Solaris with the Studio
compilers.

"gui_gtk_f.c", line 507: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void
"gui_gtk_f.c", line 510: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void
"gui_gtk_f.c", line 795: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void
"gui_gtk_f.c", line 797: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void
"gui_beval.c", line 522: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void
"gui_beval.c", line 536: warning: argument #6 is incompatible with 
prototype:
prototype: pointer to void : 
"/usr/include/glib-2.0/gobject/gsignal.h", line 431
argument : pointer to function(void) returning void

Frankly, it seems like it's a gtk/glib mismatch, since all the mechanism
comes from those headers: GTK_SIGNAL_FUNC is G_CALLBACK, which just casts
its argument to GCallback, which is the function pointer mentioned above,
while the function prototype for gtk_signal_disconnect_by_func() takes a
gpointer, which is the void *.

glib is 2.46, gtk3 is 3.18.

I don't see this in the travis logs, but I can't tell from there what
versions of glib and gtk are in use.

Does this look familiar to anyone?

Thanks,
Danek

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.