public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/15369] "Wrong" line number for static constructor function
       [not found] <bug-15369-4@http.gcc.gnu.org/bugzilla/>
@ 2012-01-03  9:44 ` paolo.carlini at oracle dot com
  0 siblings, 0 replies; 4+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-01-03  9:44 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |jakub at gcc dot gnu.org

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-01-03 09:44:10 UTC ---
Any idea how are we doing on this?


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

* [Bug c++/15369] "Wrong" line number for static constructor function
       [not found] <bug-15369-8498@http.gcc.gnu.org/bugzilla/>
@ 2005-10-27  1:10 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-10-27  1:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from pinskia at gcc dot gnu dot org  2005-10-27 01:10 -------
*** Bug 24550 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |reddy at pixar dot com


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


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

* [Bug c++/15369] "Wrong" line number for static constructor function
  2004-05-11 19:03 [Bug c++/15369] New: 3.4.0 Compiler emits wrong linenumbers nikolay at etnus dot com
  2004-10-15  7:39 ` [Bug c++/15369] "Wrong" line number for static constructor function rth at gcc dot gnu dot org
@ 2005-01-14  3:00 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-14  3:00 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2004-10-15 07:39:18         |2005-01-14 03:00:09
               date|                            |
   Target Milestone|4.0.0                       |---


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


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

* [Bug c++/15369] "Wrong" line number for static constructor function
  2004-05-11 19:03 [Bug c++/15369] New: 3.4.0 Compiler emits wrong linenumbers nikolay at etnus dot com
@ 2004-10-15  7:39 ` rth at gcc dot gnu dot org
  2005-01-14  3:00 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-10-15  7:39 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-10-15 07:39 -------
The bug here happens because once we start processing functions, input_location
changes effectively at random.  E.g. walk_tree sets input_location based on the
tree node that we're currently processing.  Which is, frankly, insane.

It also turns out to be remarkably difficult to get hold of the locus for the
end of file because c-lex and the c++ front end conspire to discard the locus
that the preprocessor helpfully collects for CPP_EOF.

I'll note that this has only "worked" by chance in previous versions and on 
mainline.  What line number we get for the static constructors depends on what
order we find ourselves processing the functions (inlined, not inlined, etc).
I.e. essentially random.  So it seems a streach to call this a 3.4 regression.

There appears to be no non-invasive solution for this for 3.4.  My personal
feeling is that some C++ lexer guy ought to fix this for mainline, and we 
should WONTFIX the problem for previous versions.  It's definitely non-critical
and there's a perfectly good workaround for users -- set breakpoints on
function names rather than line numbers.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor
          Component|debug                       |c++
  GCC build triplet|i686-pc-linux               |
   GCC host triplet|i686-pc-linux               |
 GCC target triplet|i686-pc-linux               |
      Known to work|4.0 3.3.3                   |
   Last reconfirmed|2004-05-10 20:28:06         |2004-10-15 07:39:18
               date|                            |
            Summary|[3.4 Regression] Compiler   |"Wrong" line number for
                   |emits wrong linenumbers     |static constructor function
   Target Milestone|3.4.3                       |4.0.0


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


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

end of thread, other threads:[~2012-01-03  9:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-15369-4@http.gcc.gnu.org/bugzilla/>
2012-01-03  9:44 ` [Bug c++/15369] "Wrong" line number for static constructor function paolo.carlini at oracle dot com
     [not found] <bug-15369-8498@http.gcc.gnu.org/bugzilla/>
2005-10-27  1:10 ` pinskia at gcc dot gnu dot org
2004-05-11 19:03 [Bug c++/15369] New: 3.4.0 Compiler emits wrong linenumbers nikolay at etnus dot com
2004-10-15  7:39 ` [Bug c++/15369] "Wrong" line number for static constructor function rth at gcc dot gnu dot org
2005-01-14  3:00 ` pinskia 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).