forked from diffblue/cbmc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not use c_qualifiers on goto-program expressions
goto-programs are not C specific.
- Loading branch information
1 parent
7716f3f
commit 0a77ce0
Showing
3 changed files
with
6 additions
and
18 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
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 |
---|---|---|
@@ -1,5 +1,4 @@ | ||
analyses | ||
ansi-c # should go away | ||
goto-programs | ||
langapi # should go away | ||
pointer-analysis | ||
|
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 |
---|---|---|
|
@@ -16,8 +16,6 @@ Author: Thomas Kiley, [email protected] | |
#include <util/std_expr.h> | ||
#include <util/symbol_table.h> | ||
|
||
#include <ansi-c/c_qualifiers.h> | ||
|
||
#include "goto_functions.h" | ||
|
||
#define LOG(message, irep) \ | ||
|
@@ -786,16 +784,10 @@ bool remove_const_function_pointerst::is_const_expression( | |
/// arrays are implicitly const in C. | ||
bool remove_const_function_pointerst::is_const_type(const typet &type) const | ||
{ | ||
c_qualifierst qualifers(type); | ||
if(type.id()==ID_array) | ||
{ | ||
c_qualifierst array_type_qualifers(type.subtype()); | ||
return qualifers.is_constant || array_type_qualifers.is_constant; | ||
} | ||
else | ||
{ | ||
return qualifers.is_constant; | ||
} | ||
if(type.id() == ID_array && type.subtype().get_bool(ID_C_constant)) | ||
return true; | ||
|
||
return type.get_bool(ID_C_constant); | ||
} | ||
|
||
/// To extract the value of the specific component within a struct | ||
|