public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/25892]  New: -Wpointer-sign creates problems for Emacs
@ 2006-01-21  1:40 jbuck at gcc dot gnu dot org
  2006-01-21  1:41 ` [Bug c/25892] " jbuck at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 14+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-01-21  1:40 UTC (permalink / raw)
  To: gcc-bugs

The original report from RMS stated:

"GCC 4 when compiling Emacs gives annoying warnings about
mismatched signs of pointer target types.  To turn this
off is not trivial, since the -Wno-pointer-sign option
itself causes a diagnostic from older GCC versions.
It makes compilation fail."

Evidently changing Emacs is not an acceptable option.
After discussion with the SC and the original contributor
of the -Wpointer-sign patch, the SC agreed that
the best solution would be for -Wpointer-sign not to be
enabled by default, but only if -Wall or --pedantic is present.

Since the SC promised this fix to RMS, it needs to be considered
a release blocker for 4.1.

(I don't know about 4.0.3, probably best to do it there too).


-- 
           Summary: -Wpointer-sign creates problems for Emacs
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jbuck at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
@ 2006-01-21  1:41 ` jbuck at gcc dot gnu dot org
  2006-01-21  1:42 ` jbuck at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-01-21  1:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from jbuck at gcc dot gnu dot org  2006-01-21 01:41 -------
Created an attachment (id=10693)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10693&action=view)
testcase


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
  2006-01-21  1:41 ` [Bug c/25892] " jbuck at gcc dot gnu dot org
@ 2006-01-21  1:42 ` jbuck at gcc dot gnu dot org
  2006-01-21  1:43 ` jbuck at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-01-21  1:42 UTC (permalink / raw)
  To: gcc-bugs



-- 

jbuck at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Target Milestone|---                         |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
  2006-01-21  1:41 ` [Bug c/25892] " jbuck at gcc dot gnu dot org
  2006-01-21  1:42 ` jbuck at gcc dot gnu dot org
@ 2006-01-21  1:43 ` jbuck at gcc dot gnu dot org
  2006-01-23 16:28 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-01-21  1:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

jbuck at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-01-21 01:43:36
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-01-21  1:43 ` jbuck at gcc dot gnu dot org
@ 2006-01-23 16:28 ` pinskia at gcc dot gnu dot org
  2006-01-25 17:40 ` aoliva at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-01-23 16:28 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-01-23 16:28 ` pinskia at gcc dot gnu dot org
@ 2006-01-25 17:40 ` aoliva at gcc dot gnu dot org
  2006-01-25 18:12 ` aoliva at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-25 17:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from aoliva at gcc dot gnu dot org  2006-01-25 17:40 -------
Mine


-- 

aoliva at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |aoliva at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-01-25 17:40 ` aoliva at gcc dot gnu dot org
@ 2006-01-25 18:12 ` aoliva at gcc dot gnu dot org
  2006-01-25 18:13   ` Andrew Pinski
  2006-01-25 18:14 ` pinskia at physics dot uc dot edu
                   ` (5 subsequent siblings)
  11 siblings, 1 reply; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-25 18:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from aoliva at gcc dot gnu dot org  2006-01-25 18:12 -------
Created an attachment (id=10728)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10728&action=view)
Patch that disables -Wpointer-sign by default, but gets -Wall or -pedantic to
imply it

This patch implements the suggested (agreed-upon?) semantics.  I've only tested
it manually so far; bootstrap ongoing, test cycle to follow, will submit
formally then.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-25 18:12 ` aoliva at gcc dot gnu dot org
@ 2006-01-25 18:13   ` Andrew Pinski
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Pinski @ 2006-01-25 18:13 UTC (permalink / raw)
  To: gcc-bugzilla; +Cc: gcc-bugs

> 
> 
> 
> ------- Comment #3 from aoliva at gcc dot gnu dot org  2006-01-25 18:12 -------
> Created an attachment (id=10728)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10728&action=view)
> Patch that disables -Wpointer-sign by default, but gets -Wall or -pedantic to
> imply it

I thought it was agreed that -Wall should not enable it either (or maybe
I am misrembering).

-- Pinski


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-01-25 18:12 ` aoliva at gcc dot gnu dot org
@ 2006-01-25 18:14 ` pinskia at physics dot uc dot edu
  2006-01-25 18:17 ` aoliva at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: pinskia at physics dot uc dot edu @ 2006-01-25 18:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from pinskia at gcc dot gnu dot org  2006-01-25 18:13 -------
Subject: Re:  -Wpointer-sign creates problems for Emacs

> 
> 
> 
> ------- Comment #3 from aoliva at gcc dot gnu dot org  2006-01-25 18:12 -------
> Created an attachment (id=10728)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10728&action=view)
>  --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10728&action=view)
> Patch that disables -Wpointer-sign by default, but gets -Wall or -pedantic to
> imply it

I thought it was agreed that -Wall should not enable it either (or maybe
I am misrembering).

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-01-25 18:14 ` pinskia at physics dot uc dot edu
@ 2006-01-25 18:17 ` aoliva at gcc dot gnu dot org
  2006-01-25 18:49 ` jbuck at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-25 18:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from aoliva at gcc dot gnu dot org  2006-01-25 18:17 -------
All I know is what's in the bug report.  It says -Wall or -pedantic.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-01-25 18:17 ` aoliva at gcc dot gnu dot org
@ 2006-01-25 18:49 ` jbuck at gcc dot gnu dot org
  2006-01-26 18:50 ` aoliva at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 14+ messages in thread
From: jbuck at gcc dot gnu dot org @ 2006-01-25 18:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jbuck at gcc dot gnu dot org  2006-01-25 18:49 -------

Alexandre's right, -Wall should enable the warning.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-01-25 18:49 ` jbuck at gcc dot gnu dot org
@ 2006-01-26 18:50 ` aoliva at gcc dot gnu dot org
  2006-01-26 19:06 ` aoliva at gcc dot gnu dot org
  2006-01-26 19:09 ` aoliva at gcc dot gnu dot org
  11 siblings, 0 replies; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-26 18:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from aoliva at gcc dot gnu dot org  2006-01-26 18:50 -------
Subject: Bug 25892

Author: aoliva
Date: Thu Jan 26 18:50:37 2006
New Revision: 110265

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110265
Log:
gcc/ChangeLog:
PR c/25892
* c.opt (Wpointer-sign): Init to -1.
* c-opts.c (c_common_handle_option): Set to 1 on OPT_Wall and
OPT_pedantic, to 0 otherwise.
* doc/invoke.texi: Update.
gcc/testsuite/ChangeLog:
PR c/25892
* gcc.dg/Wpointer-sign.c: New.
* gcc.dg/Wpointer-sign-Wall.c: New.
* gcc.dg/Wpointer-sign-Wall-no.c: New.
* gcc.dg/Wpointer-sign-pedantic.c: New.
* gcc.dg/Wpointer-sign-pedantic-no.c: New.
* gcc.dg/conv-2.c: Use -Wpointer-sign.

Added:
    trunk/gcc/testsuite/gcc.dg/Wpointer-sign-Wall-no.c
    trunk/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
    trunk/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic-no.c
    trunk/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
    trunk/gcc/testsuite/gcc.dg/Wpointer-sign.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-opts.c
    trunk/gcc/c.opt
    trunk/gcc/doc/invoke.texi
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/gcc.dg/conv-2.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2006-01-26 18:50 ` aoliva at gcc dot gnu dot org
@ 2006-01-26 19:06 ` aoliva at gcc dot gnu dot org
  2006-01-26 19:09 ` aoliva at gcc dot gnu dot org
  11 siblings, 0 replies; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-26 19:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from aoliva at gcc dot gnu dot org  2006-01-26 19:06 -------
Subject: Bug 25892

Author: aoliva
Date: Thu Jan 26 19:06:06 2006
New Revision: 110267

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=110267
Log:
gcc/ChangeLog:
PR c/25892
* c.opt (Wpointer-sign): Init to -1.
* c-opts.c (c_common_handle_option): Set to 1 on OPT_Wall and
OPT_pedantic, to 0 otherwise.
* doc/invoke.texi: Update.
gcc/testsuite/ChangeLog:
PR c/25892
* gcc.dg/Wpointer-sign.c: New.
* gcc.dg/Wpointer-sign-Wall.c: New.
* gcc.dg/Wpointer-sign-Wall-no.c: New.
* gcc.dg/Wpointer-sign-pedantic.c: New.
* gcc.dg/Wpointer-sign-pedantic-no.c: New.
* gcc.dg/conv-2.c: Use -Wpointer-sign.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/Wpointer-sign-Wall-no.c
      - copied unchanged from r110265,
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-Wall-no.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
      - copied unchanged from r110265,
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-Wall.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic-no.c
      - copied unchanged from r110265,
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic-no.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
      - copied unchanged from r110265,
trunk/gcc/testsuite/gcc.dg/Wpointer-sign-pedantic.c
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/Wpointer-sign.c
      - copied unchanged from r110265,
trunk/gcc/testsuite/gcc.dg/Wpointer-sign.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/c-opts.c
    branches/gcc-4_1-branch/gcc/c.opt
    branches/gcc-4_1-branch/gcc/doc/invoke.texi
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/conv-2.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [Bug c/25892] -Wpointer-sign creates problems for Emacs
  2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2006-01-26 19:06 ` aoliva at gcc dot gnu dot org
@ 2006-01-26 19:09 ` aoliva at gcc dot gnu dot org
  11 siblings, 0 replies; 14+ messages in thread
From: aoliva at gcc dot gnu dot org @ 2006-01-26 19:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from aoliva at gcc dot gnu dot org  2006-01-26 19:09 -------
Fixed


-- 

aoliva at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25892


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2006-01-26 19:09 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-21  1:40 [Bug c/25892] New: -Wpointer-sign creates problems for Emacs jbuck at gcc dot gnu dot org
2006-01-21  1:41 ` [Bug c/25892] " jbuck at gcc dot gnu dot org
2006-01-21  1:42 ` jbuck at gcc dot gnu dot org
2006-01-21  1:43 ` jbuck at gcc dot gnu dot org
2006-01-23 16:28 ` pinskia at gcc dot gnu dot org
2006-01-25 17:40 ` aoliva at gcc dot gnu dot org
2006-01-25 18:12 ` aoliva at gcc dot gnu dot org
2006-01-25 18:13   ` Andrew Pinski
2006-01-25 18:14 ` pinskia at physics dot uc dot edu
2006-01-25 18:17 ` aoliva at gcc dot gnu dot org
2006-01-25 18:49 ` jbuck at gcc dot gnu dot org
2006-01-26 18:50 ` aoliva at gcc dot gnu dot org
2006-01-26 19:06 ` aoliva at gcc dot gnu dot org
2006-01-26 19:09 ` aoliva at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).