Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
by ignoring unavoidable but unneeded _Complex and __float128 keywords. Upstream issue: samee/obliv-c#48
- Loading branch information
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
pkgs/development/compilers/obliv-c/ignore-complex-float128.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- a/src/frontc/clexer.mll | ||
+++ b/src/frontc/clexer.mll | ||
@@ -134,9 +134,11 @@ let init_lexicon _ = | ||
(* WW: see /usr/include/sys/cdefs.h for why __signed and __volatile | ||
* are accepted GCC-isms *) | ||
("_Bool", fun loc -> BOOL loc); | ||
+ ("_Complex", fun loc -> COMPLEX loc); | ||
("char", fun loc -> CHAR loc); | ||
("int", fun loc -> INT loc); | ||
("float", fun loc -> FLOAT loc); | ||
+ ("__float128", fun loc -> FLOAT128 loc); | ||
("double", fun loc -> DOUBLE loc); | ||
("void", fun loc -> VOID loc); | ||
("enum", fun loc -> ENUM loc); | ||
--- a/src/frontc/cparser.mly | ||
+++ b/src/frontc/cparser.mly | ||
@@ -269,6 +269,8 @@ let oblivState (s:statement): statement = | ||
%token<Cabs.cabsloc> VOLATILE EXTERN STATIC CONST RESTRICT AUTO REGISTER FROZEN | ||
%token<Cabs.cabsloc> THREAD | ||
|
||
+%token<Cabs.cabsloc> COMPLEX FLOAT128 | ||
+ | ||
%token<Cabs.cabsloc> SIZEOF ALIGNOF | ||
|
||
%token EQ PLUS_EQ MINUS_EQ STAR_EQ SLASH_EQ PERCENT_EQ | ||
@@ -1002,7 +1004,11 @@ type_spec: /* ISO 6.7.2 */ | ||
| LONG { Tlong, $1 } | ||
| INT64 { Tint64, $1 } | ||
| FLOAT { Tfloat, $1 } | ||
+| FLOAT128 { Tfloat, $1 } | ||
| DOUBLE { Tdouble, $1 } | ||
+| COMPLEX FLOAT { Tfloat, $2 } | ||
+| COMPLEX FLOAT128{ Tfloat, $2 } | ||
+| COMPLEX DOUBLE { Tdouble, $2 } | ||
| SIGNED { Tsigned, $1 } | ||
| UNSIGNED { Tunsigned, $1 } | ||
| STRUCT id_or_typename |
7f8bc04
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this patch fix Obliv-C functionality for glibc 2.27 as well?