public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
@ 2014-04-01  9:22 ` mark at gcc dot gnu.org
  2014-04-01  9:30 ` mark at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-04-01  9:22 UTC (permalink / raw)
  To: gcc-bugs

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

Mark Wielaard <mark at gcc dot gnu.org> changed:

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

--- Comment #4 from Mark Wielaard <mark at gcc dot gnu.org> ---
DWARFv4 did add several new DW_LANG codes to distinquish between Ada versions.
DWARFv5 will likely add DW_LANG codes for C++03, C++11 and C11.


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
  2014-04-01  9:22 ` [Bug debug/38757] gcc does not emit DW_LANG_C99 mark at gcc dot gnu.org
@ 2014-04-01  9:30 ` mark at gcc dot gnu.org
  2014-06-06 21:24 ` mark at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-04-01  9:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Mark Wielaard <mark at gcc dot gnu.org> ---
Patch has been discussed on the patches list a couple of times in the past, but
not yet applied:

http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00858.html
http://gcc.gnu.org/ml/gcc-patches/2010-04/msg00991.html

An updated version of the patch is also available as part of the Fedora GCC
package:

http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc48-pr38757.patch


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
  2014-04-01  9:22 ` [Bug debug/38757] gcc does not emit DW_LANG_C99 mark at gcc dot gnu.org
  2014-04-01  9:30 ` mark at gcc dot gnu.org
@ 2014-06-06 21:24 ` mark at gcc dot gnu.org
  2014-11-21 16:00 ` mark at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-06-06 21:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38757

--- Comment #6 from Mark Wielaard <mark at gcc dot gnu.org> ---
Current 4.9 rebased version of the patch is here:
http://pkgs.fedoraproject.org/cgit/gcc.git/tree/gcc49-pr38757.patch


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2014-06-06 21:24 ` mark at gcc dot gnu.org
@ 2014-11-21 16:00 ` mark at gcc dot gnu.org
  2014-11-26 11:05 ` mark at gcc dot gnu.org
  2014-11-26 11:13 ` mark at gcc dot gnu.org
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-11-21 16:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38757

--- Comment #7 from Mark Wielaard <mark at gcc dot gnu.org> ---
Author: mark
Date: Fri Nov 21 16:00:06 2014
New Revision: 217934

URL: https://gcc.gnu.org/viewcvs?rev=217934&root=gcc&view=rev
Log:
PR debug/38757 gcc does not emit DW_LANG_C99.

For C and C++ add the language standard version in use to lang_hooks.name.
Change users of lang_hook.name to check with new functions lang_GNU_C or
lang_GNU_CXX. In dwarf2out.c output the DW_LANG_C version from the
lang_hooks.name and merge any LTO TRANSLATION_UNIT_LANGUAGE found. Adds
two testcases to dwarf2.exp to check the right DWARF DW_AT_language is set
on the compile_unit depending on the -std=c89 or -std=c99 setting.

gcc/c-family/ChangeLog

    PR debug/38757
    * c-opts.c (set_std_c89): Set lang_hooks.name.
    (set_std_c99): Likewise.
    (set_std_c11): Likewise.
    (set_std_cxx98): Likewise.
    (set_std_cxx11): Likewise.
    (set_std_cxx14): Likewise.
    (set_std_cxx1z): Likewise.

gcc/ChangeLog

    PR debug/38757
    * config/avr/avr-c.c (avr_cpu_cpp_builtins): Use lang_GNU_C.
    * config/darwin.c (darwin_file_end): Use lang_GNU_CXX.
    (darwin_override_options): Likewise.
    * config/ia64/ia64.c (ia64_struct_retval_addr_is_first_parm_p):
    Likewise.
    * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
    Likewise.
    * dbxout.c (get_lang_number): Likewise.
    (dbxout_type): Likewise.
    (dbxout_symbol_location): Likewise.
    * dwarf2out.c (add_prototyped_attribute): Add DW_AT_prototype
    also for DW_LANG_{C,C99,ObjC}.
    (highest_c_language): New function.
    (gen_compile_unit_die): Call highest_c_language to merge LTO
    TRANSLATION_UNIT_LANGUAGE. Use strncmp language_string to
    determine if DW_LANG_C99 or DW_LANG_C89 should be returned.
    * fold-const.c (fold_cond_expr_with_comparison): Use lang_GNU_CXX.
    * langhooks.h (struct lang_hooks): Add version comment to name.
    (lang_GNU_C): New function declaration.
    (lang_GNU_CXX): Likewise.
    * langhooks.c (lang_GNU_C): New function.
    (lang_GNU_CXX): Likewise.
    * vmsdbgout.c (vmsdbgout_init): Use lang_GNU_C and lang_GNU_CXX.

gcc/testsuite/ChangeLog

    PR debug/38757
    * gcc.dg/debug/dwarf2/lang-c89.c: New test.
    * gcc.dg/debug/dwarf2/lang-c99.c: Likewise.

Added:
    trunk/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c89.c
    trunk/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c99.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-family/ChangeLog
    trunk/gcc/c-family/c-opts.c
    trunk/gcc/config/avr/avr-c.c
    trunk/gcc/config/darwin.c
    trunk/gcc/config/ia64/ia64.c
    trunk/gcc/config/rs6000/rs6000.c
    trunk/gcc/dbxout.c
    trunk/gcc/dwarf2out.c
    trunk/gcc/fold-const.c
    trunk/gcc/langhooks.c
    trunk/gcc/langhooks.h
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/vmsdbgout.c


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2014-11-21 16:00 ` mark at gcc dot gnu.org
@ 2014-11-26 11:05 ` mark at gcc dot gnu.org
  2014-11-26 11:13 ` mark at gcc dot gnu.org
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-11-26 11:05 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38757

--- Comment #8 from Mark Wielaard <mark at gcc dot gnu.org> ---
Author: mark
Date: Wed Nov 26 11:05:20 2014
New Revision: 218077

URL: https://gcc.gnu.org/viewcvs?rev=218077&root=gcc&view=rev
Log:
PR debug/38757 continued. Handle C11, C++11 and C++14.

Add experimental (minimal) DWARFv5 support.

This change depends on the new DWARFv5 constants mentioned in the
following draft: http://dwarfstd.org/doc/dwarf5.20141029.pdf

gcc/ChangeLog

    * doc/invoke.texi (-gdwarf-@{version}): Mention experimental DWARFv5.
    * opts.c (common_handle_option): Accept -gdwarf-5.
    * dwarf2out.c (is_cxx): Add DW_LANG_C_plus_plus_11 and
    DW_LANG_C_plus_plus_14.
    (lower_bound_default): Likewise. Plus DW_LANG_C11.
    (gen_compile_unit_die): Output DW_LANG_C_plus_plus_11,
    DW_LANG_C_plus_plus_14 or DW_LANG_C11.
    (output_compilation_unit_header): Output at most a DWARFv4 header.
    (output_skeleton_debug_sections): Likewise.
    (output_line_info): Likewise.
    (output_aranges): Document header version number.

gcc/testsuite/ChangeLog

    * gcc.dg/debug/dwarf2/lang-c11.c: New test.
    * gcc.dg/debug/dwarf2/lang-c11-d4-strict.c: Likewise.
    * g++.dg/debug/dwarf2/lang-cpp11.C: Likewise.
    * g++.dg/debug/dwarf2/lang-cpp14.C: Likewise.
    * g++.dg/debug/dwarf2/lang-cpp98.C: Likewise.

include/ChangeLog

    * dwarf2.h: Add DW_LANG_C_plus_plus_11, DW_LANG_C11 and
    DW_LANG_C_plus_plus_14.

Added:
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp11.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp14.C
    trunk/gcc/testsuite/g++.dg/debug/dwarf2/lang-cpp98.C
    trunk/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11-d4-strict.c
    trunk/gcc/testsuite/gcc.dg/debug/dwarf2/lang-c11.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/doc/invoke.texi
    trunk/gcc/dwarf2out.c
    trunk/gcc/opts.c
    trunk/gcc/testsuite/ChangeLog
    trunk/include/ChangeLog
    trunk/include/dwarf2.h


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
       [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2014-11-26 11:05 ` mark at gcc dot gnu.org
@ 2014-11-26 11:13 ` mark at gcc dot gnu.org
  5 siblings, 0 replies; 9+ messages in thread
From: mark at gcc dot gnu.org @ 2014-11-26 11:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38757

Mark Wielaard <mark at gcc dot gnu.org> changed:

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

--- Comment #9 from Mark Wielaard <mark at gcc dot gnu.org> ---
Patch committed


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
  2009-01-07 19:30 [Bug debug/38757] New: " tromey at gcc dot gnu dot org
  2009-01-09 20:25 ` [Bug debug/38757] " pinskia at gcc dot gnu dot org
  2009-03-18 10:59 ` jakub at gcc dot gnu dot org
@ 2009-03-18 12:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-18 12:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jakub at gcc dot gnu dot org  2009-03-18 12:52 -------
Created an attachment (id=17484)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17484&action=view)
gcc44-pr38757.patch

Fix which will allow later on similar differentiation between C++98 and C++0x
or say Fortran 95 and Fortran 200{3,8} if Dwarf4 adds new DW_LANG_* codes.


-- 

jakub at gcc dot gnu dot org changed:

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


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


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
  2009-01-07 19:30 [Bug debug/38757] New: " tromey at gcc dot gnu dot org
  2009-01-09 20:25 ` [Bug debug/38757] " pinskia at gcc dot gnu dot org
@ 2009-03-18 10:59 ` jakub at gcc dot gnu dot org
  2009-03-18 12:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu dot org @ 2009-03-18 10:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from jakub at gcc dot gnu dot org  2009-03-18 10:59 -------
BTW, related, we only generate DW_AT_prototyped attributes for DW_LANG_C89,
shouldn't we generate them also for DW_LANG_C99, DW_LANG_ObjC?

As lang_hooks are const, we can't modify lang_hooks.name depending on
-std={c,gnu}99 vs. -std={c,gnu}89 (for Fortran I think we don't support
-std=f77 or -std=f90, so there isn't a problem until Dwarf4 adds new
DW_LANG_Fortran* codes), so we'd need a langhook function that would return the
desired DW_LANG_* value or something like that.


-- 


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


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

* [Bug debug/38757] gcc does not emit DW_LANG_C99
  2009-01-07 19:30 [Bug debug/38757] New: " tromey at gcc dot gnu dot org
@ 2009-01-09 20:25 ` pinskia at gcc dot gnu dot org
  2009-03-18 10:59 ` jakub at gcc dot gnu dot org
  2009-03-18 12:52 ` jakub at gcc dot gnu dot org
  2 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-01-09 20:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-01-09 20:25 -------
Confirmed, I noticed this also.


-- 

pinskia 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         |2009-01-09 20:25:30
               date|                            |


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


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

end of thread, other threads:[~2014-11-26 11:13 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-38757-4@http.gcc.gnu.org/bugzilla/>
2014-04-01  9:22 ` [Bug debug/38757] gcc does not emit DW_LANG_C99 mark at gcc dot gnu.org
2014-04-01  9:30 ` mark at gcc dot gnu.org
2014-06-06 21:24 ` mark at gcc dot gnu.org
2014-11-21 16:00 ` mark at gcc dot gnu.org
2014-11-26 11:05 ` mark at gcc dot gnu.org
2014-11-26 11:13 ` mark at gcc dot gnu.org
2009-01-07 19:30 [Bug debug/38757] New: " tromey at gcc dot gnu dot org
2009-01-09 20:25 ` [Bug debug/38757] " pinskia at gcc dot gnu dot org
2009-03-18 10:59 ` jakub at gcc dot gnu dot org
2009-03-18 12:52 ` jakub 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).