public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: jfischer110@attbi.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/7855: Wrong line number specified in error / warning message
Date: Sun, 08 Sep 2002 03:06:00 -0000	[thread overview]
Message-ID: <20020908100349.13866.qmail@sources.redhat.com> (raw)


>Number:         7855
>Category:       c++
>Synopsis:       Wrong line number specified in error / warning message
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 08 03:06:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jim Fischer
>Release:        3.2
>Organization:
>Environment:
System: Linux pluto 2.4.18-10 #1 Wed Aug 7 11:39:21 EDT 2002 i686 unknown
Architecture: i686

        <machine, os, target, libraries (multiple lines)>
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.2/configure --with-local-prefix=/usr --enable-threads --enable-version-specific-runtime-libs --enable-languages=c,c++
>Description:
When I try to assign the address of a static class member function to a non-static member function pointer, the compiler correctly emits an error message (this is an illegal pointer assignment), but the line number that's specified in the error message identifies the line that's just below the line that contains the actual error:

  /* n */  Line 'n' has the bogus pointer assignment
  /* n+1 */  This is the line the g++ error message id's

And for some strange reason, g++ 3.2 also emits an "unused variable" warning for line 'n' (the line that has the bogus pointer assignment) -- see the attached code sample.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/x-gzip; name="err-msg-wrong-line-number.tgz"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="err-msg-wrong-line-number.tgz"

H4sIAMweez0AA+1XbW/bNhDO1/BXHIp0tZLIlpTEBpxlaJp5XTdnDZJiy9AWLS3RNlua0kgpaRfk
v+9IvcaNG2ANWgzTg8A6k8+98I6+i5hS7kLP3EsVy5kruGSuzBYTpnpr9wbP2/UGgz18et6gv3vj
WWDNG+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Ij6OTgrLRSWiqs4lO
4aHhbT/sRuax0SnMOE7O/oRrmSUvZ51ZUmHcKUWHkOdPfrnNX5Q7jLdrJSfnfsps8nJW7q0w7ZQi
ejs6WoeD5ReXMMT1n8aHT89wk6CGlY14fg638Le2zE5Buo83HjIuvbvjhjXBJ2T87IldF4XJNxgt
uCLB+ctoRMjp8fqBjUot0AkhxuowT++ZA/k/8oR0T35+/tufuBEKpUNF8gcMyfpj688YCAWjqkEt
dPOHoW50jg9/HZls5pcK01mJ1qdJvGN4mB1DK5Nk5HElWZZ5r9t4bNbxfGiIT9lf0PG2N66Mj/Ho
99H42iFYVzRsSry+D5X7x431JLm5w4Rm1XZoYzmyoRRFtfJRIeJ75sb3eSS1TpI0T9BUq07T1GMy
4tPV8UdhbtXMq5Bhuj8f0LEx/EMejzlcGVJT/bOR1QaKwKpy5hbsJxazeSMYxXda84nfsFnOWPom
/xpP3hVSxJJcaig2qeSG3tAGenqMsV3l9+O6oVdZJbX9hkZxi2p+7buSbvDtTTcVkLeVwC1+khWx
yMu3bswtWrRo0aJFixYtWrRo0aJFixYtWtwD/gGuanovACgAAA==


             reply	other threads:[~2002-09-08 10:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-08  3:06 jfischer110 [this message]
2002-09-13  9:39 nathan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020908100349.13866.qmail@sources.redhat.com \
    --to=jfischer110@attbi.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).