public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug treelang/55269] New: Rename tree_node complex field to avoid conflict with C99 complex type
@ 2012-11-11  6:14 peter at colberg dot org
  2012-11-11  6:22 ` [Bug treelang/55269] " pinskia at gcc dot gnu.org
  2013-02-03 22:52 ` peter at colberg dot org
  0 siblings, 2 replies; 3+ messages in thread
From: peter at colberg dot org @ 2012-11-11  6:14 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55269
           Summary: Rename tree_node complex field to avoid conflict with
                    C99 complex type
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: treelang
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: peter@colberg.org


Dear GCC developers,

The identifier of the union field "tree_complex complex" of union tree_node in
tree.h potentially conflicts with the macro "#define complex _Complex" defined
in C99 <complex.h>.

I stumbled over this issue while writing a plugin for GCC using the foreign
function interface of LuaJIT. LuaJIT predefines C99 complex types, both
"_Complex" and "complex". Therefore LuaJIT rejects "tree_complex complex"
of tree_node as a declaration with an invalid declaration.

Could the tree_complex field be renamed, e.g., to "complex_cst"?

(The suggestion stems from the name of the macro COMPLEX_CST_CHECK.)

Regards,
Peter


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

* [Bug treelang/55269] Rename tree_node complex field to avoid conflict with C99 complex type
  2012-11-11  6:14 [Bug treelang/55269] New: Rename tree_node complex field to avoid conflict with C99 complex type peter at colberg dot org
@ 2012-11-11  6:22 ` pinskia at gcc dot gnu.org
  2013-02-03 22:52 ` peter at colberg dot org
  1 sibling, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-11  6:22 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-11 06:21:55 UTC ---
In 4.8, GCC is now written in C++ rather than C, so I don't think it matter
anymore as there is no macro define in C++ for complex.


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

* [Bug treelang/55269] Rename tree_node complex field to avoid conflict with C99 complex type
  2012-11-11  6:14 [Bug treelang/55269] New: Rename tree_node complex field to avoid conflict with C99 complex type peter at colberg dot org
  2012-11-11  6:22 ` [Bug treelang/55269] " pinskia at gcc dot gnu.org
@ 2013-02-03 22:52 ` peter at colberg dot org
  1 sibling, 0 replies; 3+ messages in thread
From: peter at colberg dot org @ 2013-02-03 22:52 UTC (permalink / raw)
  To: gcc-bugs


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

peter at colberg dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #2 from peter at colberg dot org 2013-02-03 22:51:29 UTC ---
Closing this bug since it no longer applies to GCC ≥ 4.8.


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

end of thread, other threads:[~2013-02-03 22:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-11  6:14 [Bug treelang/55269] New: Rename tree_node complex field to avoid conflict with C99 complex type peter at colberg dot org
2012-11-11  6:22 ` [Bug treelang/55269] " pinskia at gcc dot gnu.org
2013-02-03 22:52 ` peter at colberg 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).