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]

[PATCH][buildrobot] libcpp/lex.c: Use enum properly


Hi!

While building with IBM's XL C/C++ compiler, I noticed (cf.
http://toolchain.lug-owl.de/buildbot/deliver_artifact.php?mode=view&id=128806):

source='/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c' object='lex.o' libtool=no DEPDIR=.deps depmode=aix /bin/sh /home/jbglaw/repos-IBM-XL/gcc/libcpp/../depcomp /usr/vacpp/bin/xlc++  -I/home/jbglaw/repos-IBM-XL/gcc/libcpp -I. -I/home/jbglaw/repos-IBM-XL/gcc/libcpp/../include -I/home/jbglaw/repos-IBM-XL/gcc/libcpp/include  -g -Wall -Wno-narrowing -Wwrite-strings -Wmissing-format-attribute   -fno-exceptions -fno-rtti -I/home/jbglaw/repos-IBM-XL/gcc/libcpp -I. -I/home/jbglaw/repos-IBM-XL/gcc/libcpp/../include -I/home/jbglaw/repos-IBM-XL/gcc/libcpp/include   -c /home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wall was incorrectly specified. The option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wno-narrowing was incorrectly specified. The option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wwrite-strings was incorrectly specified. The option will be ignored.
/usr/vacpp/bin/xlc++: 1501-289 (W) Option -Wmissing-format-attribute was incorrectly specified. The option will be ignored.
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1381.17: 1506-277 (S) Syntax error: possible missing ';' or ','?
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1381.3: 1506-045 (S) Undeclared identifier raw_str_phase.
"/home/jbglaw/repos-IBM-XL/gcc/libcpp/lex.c", line 1500.11: 1506-045 (S) Undeclared identifier phase.
make[1]: *** [lex.o] Error 1

Fixed like this:

2013-10-24  Jan-Benedict Glaw  <jbglaw@lug-owl.de>

libcpp/
	* lex.c (lex_raw_string): Use proper type.

diff --git a/libcpp/lex.c b/libcpp/lex.c
index ed794d5..4fa244d 100644
--- a/libcpp/lex.c
+++ b/libcpp/lex.c
@@ -1377,8 +1377,7 @@ lex_raw_string (cpp_reader *pfile, cpp_token *token, const uchar *base,
   uchar temp_buffer[18];
   const uchar *orig_base;
   unsigned int raw_prefix_len = 0, raw_suffix_len = 0;
-  enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX };
-  raw_str_phase phase = RAW_STR_PREFIX;
+  enum raw_str_phase { RAW_STR_PREFIX, RAW_STR, RAW_STR_SUFFIX } phase = RAW_STR_PREFIX;
   enum cpp_ttype type;
   size_t total_len = 0;
   /* Index into temp_buffer during phases other than RAW_STR,


Ok?

MfG, JBG

-- 
      Jan-Benedict Glaw      jbglaw@lug-owl.de              +49-172-7608481
Signature of:               http://www.eyrie.org/~eagle/faqs/questions.html
the second  :

Attachment: signature.asc
Description: Digital signature


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