This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [BUILDROBOT] v850 fallout (was: Turn DECL_SECTION_NAME into string)


> Hi!
> 
> I've been away for holidays and other stuff, so this is a bit late,
> but nevermind... The stringification of DECL_SECTION_NAME had some
> fallout, see eg. http://toolchain.lug-owl.de/buildbot/show_build_details.php?id=272454
> 
> g++ -c   -g -O2 -DIN_GCC  -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -I. -I/home/jbglaw/repos/gcc/gcc -I/home/jbglaw/repos/gcc/gcc/. -I/home/jbglaw/repos/gcc/gcc/../include -I/home/jbglaw/repos/gcc/gcc/../libcpp/include  -I/home/jbglaw/repos/gcc/gcc/../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/jbglaw/repos/gcc/gcc/../libbacktrace    -o v850.o -MT v850.o -MMD -MP -MF ./.deps/v850.TPo /home/jbglaw/repos/gcc/gcc/config/v850/v850.c
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function âtree_node* v850_handle_interrupt_attribute(tree_node**, tree_node*, tree_node*, int, bool*)â:
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: unknown conversion type character âEâ in format
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2088: warning: too many arguments for format
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c: In function âvoid v850_insert_attributes(tree_node*, tree_node**)â:
> /home/jbglaw/repos/gcc/gcc/config/v850/v850.c:2647: error: cannot convert âtree_node*â to âconst char*â for argument â2â to âvoid set_decl_section_name(tree_node*, const char*)â
> make[1]: *** [v850.o] Error 1
The following patch should cure this:
Index: gcc/config/v850/v850.c
===================================================================
--- gcc/config/v850/v850.c      (revision 211693)
+++ gcc/config/v850/v850.c      (working copy)
@@ -2644,7 +2644,7 @@
          /* Only set the section name if specified by a pragma, because
             otherwise it will force those variables to get allocated storage
             in this module, rather than by the linker.  */
-         set_decl_section_name (decl, chosen_section);
+         set_decl_section_name (decl, DECL_IDENTIFIER_POINTER (chosen_section));
        }
     }
 }

but perhaps
tree GHS_default_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
tree GHS_current_section_names [(int) COUNT_OF_GHS_SECTION_KINDS];
Should be turned into strings.  I do not see who is initializing these?

Honza
> 
> MfG, JBG
> 
> -- 
>       Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
> Signature of:              Alles sollte so einfach wie mÃglich gemacht sein.
> the second  :                          Aber nicht einfacher.  (Einstein)



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]