public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54631] New: vxworks.c fails to compile
@ 2012-09-20  1:07 rbmj at verizon dot net
  2012-09-20 15:31 ` [Bug target/54631] " dnovillo at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rbmj at verizon dot net @ 2012-09-20  1:07 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 54631
           Summary: vxworks.c fails to compile
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rbmj@verizon.net


I just pulled in the latest changes, and vxworks.c no longer compiles.  The
error is at bottom.

I think this has to do with the upgrade to C++.  The code in question does
this:

elt = VEC_quick_push(constructor_elt, v, NULL);

The problem with this is that NULL is not convertible to const constructor_elt
&.  I think that with the old C API this would just construct a new object, but
that doesn't work anymore.

Changing the code to construct the object first and then add it to the vector
should work, but I don't know enough about the code to be sure.

As a question, should these files be changed to use the C++ API?  Or should
they stick with pretending that they're straight C?

Thanks!

Robert Mason

../../gcc/gcc/config/vxworks.c: In function ‘tree_node*
vxworks_emutls_var_init(tree, tree, tree)’:
../../gcc/gcc/config/vxworks.c:105:9: error: no matching function for call to
‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char
[24])’
../../gcc/gcc/config/vxworks.c:105:9: note: candidate is:
In file included from ../../gcc/gcc/tree.h:29:0,
                 from ../../gcc/gcc/config/vxworks.c:29:
../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*,
unsigned int, const char*) [with T = constructor_elt_d]
../../gcc/gcc/vec.h:783:1: note:   no known conversion for argument 1 from
‘long int’ to ‘const constructor_elt_d&’
../../gcc/gcc/config/vxworks.c:109:9: error: no matching function for call to
‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char
[24])’
../../gcc/gcc/config/vxworks.c:109:9: note: candidate is:
In file included from ../../gcc/gcc/tree.h:29:0,
                 from ../../gcc/gcc/config/vxworks.c:29:
../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*,
unsigned int, const char*) [with T = constructor_elt_d]
../../gcc/gcc/vec.h:783:1: note:   no known conversion for argument 1 from
‘long int’ to ‘const constructor_elt_d&’
../../gcc/gcc/config/vxworks.c:114:9: error: no matching function for call to
‘vec_t<constructor_elt_d>::quick_push(NULL, const char [31], int, const char
[24])’
../../gcc/gcc/config/vxworks.c:114:9: note: candidate is:
In file included from ../../gcc/gcc/tree.h:29:0,
                 from ../../gcc/gcc/config/vxworks.c:29:
../../gcc/gcc/vec.h:783:1: note: T* vec_t<T>::quick_push(const T&, const char*,
unsigned int, const char*) [with T = constructor_elt_d]
../../gcc/gcc/vec.h:783:1: note:   no known conversion for argument 1 from
‘long int’ to ‘const constructor_elt_d&’
make[2]: *** [vxworks.o] Error 1
make[1]: *** [all-gcc] Error 2
make: *** [all] Error 2


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

* [Bug target/54631] vxworks.c fails to compile
  2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
@ 2012-09-20 15:31 ` dnovillo at gcc dot gnu.org
  2012-09-20 16:31 ` dnovillo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2012-09-20 15:31 UTC (permalink / raw)
  To: gcc-bugs


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

Diego Novillo <dnovillo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-09-20
         AssignedTo|unassigned at gcc dot       |dnovillo at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1

--- Comment #1 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-09-20 15:31:19 UTC ---
Testing fix.


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

* [Bug target/54631] vxworks.c fails to compile
  2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
  2012-09-20 15:31 ` [Bug target/54631] " dnovillo at gcc dot gnu.org
@ 2012-09-20 16:31 ` dnovillo at gcc dot gnu.org
  2012-09-20 17:59 ` dnovillo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2012-09-20 16:31 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-09-20 16:31:12 UTC ---
Author: dnovillo
Date: Thu Sep 20 16:31:05 2012
New Revision: 191574

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191574
Log:
    PR target/54631
    * config/vxworks.c (vxworks_emutls_var_init): Update for new
    VEC_quick_push interface.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/vxworks.c


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

* [Bug target/54631] vxworks.c fails to compile
  2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
  2012-09-20 15:31 ` [Bug target/54631] " dnovillo at gcc dot gnu.org
  2012-09-20 16:31 ` dnovillo at gcc dot gnu.org
@ 2012-09-20 17:59 ` dnovillo at gcc dot gnu.org
  2012-09-21  0:21 ` rbmj at verizon dot net
  2012-09-21 16:21 ` dnovillo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2012-09-20 17:59 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-09-20 17:58:34 UTC ---
Should be fixed in trunk.  Robert, could you please double check?

Thanks.


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

* [Bug target/54631] vxworks.c fails to compile
  2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
                   ` (2 preceding siblings ...)
  2012-09-20 17:59 ` dnovillo at gcc dot gnu.org
@ 2012-09-21  0:21 ` rbmj at verizon dot net
  2012-09-21 16:21 ` dnovillo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rbmj at verizon dot net @ 2012-09-21  0:21 UTC (permalink / raw)
  To: gcc-bugs


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

rbmj at verizon dot net changed:

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

--- Comment #4 from rbmj at verizon dot net 2012-09-21 00:20:56 UTC ---
Fix confirmed.  Thanks for the patch and your speed!


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

* [Bug target/54631] vxworks.c fails to compile
  2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
                   ` (3 preceding siblings ...)
  2012-09-21  0:21 ` rbmj at verizon dot net
@ 2012-09-21 16:21 ` dnovillo at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2012-09-21 16:21 UTC (permalink / raw)
  To: gcc-bugs


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

Diego Novillo <dnovillo at gcc dot gnu.org> changed:

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

--- Comment #5 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-09-21 16:21:08 UTC ---
*** Bug 54658 has been marked as a duplicate of this bug. ***


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

end of thread, other threads:[~2012-09-21 16:21 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-20  1:07 [Bug target/54631] New: vxworks.c fails to compile rbmj at verizon dot net
2012-09-20 15:31 ` [Bug target/54631] " dnovillo at gcc dot gnu.org
2012-09-20 16:31 ` dnovillo at gcc dot gnu.org
2012-09-20 17:59 ` dnovillo at gcc dot gnu.org
2012-09-21  0:21 ` rbmj at verizon dot net
2012-09-21 16:21 ` dnovillo at gcc dot gnu.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).