[Crosstoolchain-logs] [device-tree-compiler] 07/357: Oops. Using %{ %} in the rules (rather than definitions) section of a lex file has undefined behaviour. In fact it ends up including the stuff within the definition of the yylex() function, leading to strange warnings on gcc-3.4 and compile errors with gcc 4.
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:05:41 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.3.x
in repository device-tree-compiler.
commit c5c437e25b13d906715b4c608c363195873a1726
Author: David Gibson <dgibson at sneetch.(none)>
Date: Mon Jul 4 13:53:14 2005 +1000
Oops. Using %{ %} in the rules (rather than definitions) section of a
lex file has undefined behaviour. In fact it ends up including the stuff
within the definition of the yylex() function, leading to strange warnings
on gcc-3.4 and compile errors with gcc 4.
---
dtc-lexer.l | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dtc-lexer.l b/dtc-lexer.l
index 58fe27c..1a16cae 100644
--- a/dtc-lexer.l
+++ b/dtc-lexer.l
@@ -29,8 +29,6 @@ WS [ \t\n]
REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
-%%
-
%{
#include "dtc.h"
@@ -46,6 +44,8 @@ REFCHAR ({PROPCHAR}|{UNITCHAR}|[/@])
%}
+%%
+
\"[^"]*\" {
DPRINT("String: %s\n", yytext);
yylval.data = data_copy_escape_string(yytext+1,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list