summaryrefslogtreecommitdiff
path: root/compiler_and_linker/FrontEnd/C
diff options
context:
space:
mode:
Diffstat (limited to 'compiler_and_linker/FrontEnd/C')
-rw-r--r--compiler_and_linker/FrontEnd/C/CPrep.c206
-rw-r--r--compiler_and_linker/FrontEnd/C/CPrepTokenizer.c20
2 files changed, 113 insertions, 113 deletions
diff --git a/compiler_and_linker/FrontEnd/C/CPrep.c b/compiler_and_linker/FrontEnd/C/CPrep.c
index 8392b44..7b6ece7 100644
--- a/compiler_and_linker/FrontEnd/C/CPrep.c
+++ b/compiler_and_linker/FrontEnd/C/CPrep.c
@@ -58,7 +58,7 @@ struct CompilerOption {
char *name;
short bits;
} compileroptions[138] = {
- "little_endian", OPT_FLAG_4000 | OPT_OFFSET(little_endian),
+ "little_endian", OPT_FLAG_4000 | OPT_OFFSET(littleendian),
"longlong", OPT_OFFSET(longlong),
"traceback", OPT_OFFSET(traceback),
"disable_registers", OPT_OFFSET(disable_registers),
@@ -71,7 +71,7 @@ struct CompilerOption {
"optimizewithasm", OPT_OFFSET(optimizewithasm),
"use_lmw_stmw", OPT_OFFSET(use_lmw_stmw),
"no_register_save_helpers", OPT_OFFSET(no_register_save_helpers),
- "ppc_opt_bclr_bcctr", OPT_OFFSET(ppc_opt_bclr_bcctr),
+ "ppc_opt_bclt_bctr", OPT_OFFSET(opt_bcc_lr_ctr),
"misaligned_mem_access", OPT_OFFSET(misaligned_mem_access),
"switch_tables", OPT_OFFSET(switch_tables),
"prepare_compress", OPT_OFFSET(prepare_compress),
@@ -81,29 +81,29 @@ struct CompilerOption {
"ecplusplus", OPT_OFFSET(ecplusplus),
"objective_c", OPT_OFFSET(objective_c),
"objc_strict", OPT_OFFSET(objc_strict),
- "ARM_conform", OPT_OFFSET(ARM_conform),
- "ARM_scoping", OPT_OFFSET(ARM_scoping),
- "require_prototypes", OPT_OFFSET(require_prototypes),
+ "ARM_conform", OPT_OFFSET(ARMconform),
+ "ARM_scoping", OPT_OFFSET(ARMscoping),
+ "require_prototypes", OPT_OFFSET(checkprotos),
"trigraphs", OPT_OFFSET(trigraphs),
- "only_std_keywords", OPT_OFFSET(only_std_keywords),
+ "only_std_keywords", OPT_OFFSET(onlystdkeywords),
"enumsalwaysint", OPT_OFFSET(enumsalwaysint),
- "ANSI_strict", OPT_OFFSET(ANSI_strict),
+ "ANSI_strict", OPT_OFFSET(ANSIstrict),
"mpwc_relax", OPT_OFFSET(mpwc_relax),
"mpwc_newline", OPT_OFFSET(mpwc_newline),
"ignore_oldstyle", OPT_OFFSET(ignore_oldstyle),
"cpp_extensions", OPT_OFFSET(cpp_extensions),
"pointercast_lvalue", OPT_OFFSET(pointercast_lvalue),
- "RTTI", OPT_OFFSET(useRTTI),
+ "RTTI", OPT_OFFSET(RTTI),
"delete_exception", OPT_OFFSET(delete_exception),
"oldalignment", OPT_OFFSET(oldalignment),
"multibyteaware", OPT_OFFSET(multibyteaware),
- "unsigned_char", OPT_OFFSET(unsignedchars),
- "auto_inline", OPT_OFFSET(autoinline),
+ "unsigned_char", OPT_OFFSET(unsigned_char),
+ "auto_inline", OPT_OFFSET(auto_inline),
"inline_bottom_up", OPT_OFFSET(inline_bottom_up),
"defer_codegen", OPT_OFFSET(defer_codegen),
"direct_to_som", OPT_OFFSET(direct_to_som),
"SOMCheckEnvironment", OPT_OFFSET(som_env_check),
- "SOMCallOptimization", OPT_OFFSET(som_call_opt),
+ "SOMCallOptimization", OPT_OFFSET(som_call_optimize),
"bool", OPT_OFFSET(booltruefalse),
"old_enum_mangler", OPT_OFFSET(old_enum_mangler),
"longlong_enums", OPT_OFFSET(longlong_enums),
@@ -144,11 +144,11 @@ struct CompilerOption {
"optEH", OPT_OFFSET(optEH),
"optEH2", OPT_OFFSET(optEH2),
"new_mangler", OPT_OFFSET(new_mangler),
- "microsoft_exceptions", OPT_OFFSET(microsoft),
- "microsoft_RTTI", OPT_OFFSET(microsoft),
+ "microsoft_exceptions", OPT_OFFSET(microsoft_EH),
+ "microsoft_RTTI", OPT_OFFSET(microsoft_EH),
"warning_errors", OPT_OFFSET(warningerrors),
"extended_errorcheck", OPT_OFFSET(pedantic),
- "check_header_flags", OPT_OFFSET(check_header_flags),
+ "check_header_flags", OPT_OFFSET(checkprecompflags),
"supress_warnings", OPT_OFFSET(supress_warnings),
"warn_illpragma", OPT_OFFSET(warn_illpragma),
"warn_emptydecl", OPT_OFFSET(warn_emptydecl),
@@ -165,40 +165,40 @@ struct CompilerOption {
"warn_no_side_effect", OPT_OFFSET(warn_no_side_effect),
"warn_resultnotused", OPT_OFFSET(warn_resultnotused),
"warn_ptr_int_conv", OPT_OFFSET(warn_ptr_int_conv),
- "align_array_members", OPT_OFFSET(align_array_members),
+ "align_array_members", OPT_OFFSET(alignarraymembers),
"dont_reuse_strings", OPT_OFFSET(dont_reuse_strings),
- "pool_strings", OPT_OFFSET(pool_strings),
+ "pool_strings", OPT_OFFSET(poolstrings),
"explicit_zero_data", OPT_OFFSET(explicit_zero_data),
"readonly_strings", OPT_OFFSET(readonly_strings),
- "opt_common_subs", OPT_OFFSET(opt_common_subs),
- "opt_loop_invariants", OPT_OFFSET(opt_loop_invariants),
- "opt_propagation", OPT_OFFSET(opt_propagation),
- "opt_unroll_loops", OPT_OFFSET(opt_unroll_loops),
- "opt_lifetimes", OPT_OFFSET(opt_lifetimes),
- "opt_strength_reduction", OPT_OFFSET(opt_strength_reduction),
- "opt_strength_reduction_strict", OPT_OFFSET(opt_strength_reduction_strict),
- "opt_dead_code", OPT_OFFSET(opt_dead_code),
- "opt_dead_assignments", OPT_OFFSET(opt_dead_assignments),
- "opt_vectorize_loops", OPT_OFFSET(opt_vectorize_loops),
+ "opt_common_subs", OPT_OFFSET(commonsubs),
+ "opt_loop_invariants", OPT_OFFSET(loopinvariants),
+ "opt_propagation", OPT_OFFSET(propagation),
+ "opt_unroll_loops", OPT_OFFSET(unrolling),
+ "opt_lifetimes", OPT_OFFSET(lifetimes),
+ "opt_strength_reduction", OPT_OFFSET(strengthreduction),
+ "opt_strength_reduction_strict", OPT_OFFSET(strengthreductionstrict),
+ "opt_dead_code", OPT_OFFSET(deadcode),
+ "opt_dead_assignments", OPT_OFFSET(deadstore),
+ "opt_vectorize_loops", OPT_OFFSET(vectorizeloops),
"opt_pointer_analysis", OPT_OFFSET(opt_pointer_analysis),
"exceptions", OPT_OFFSET(exceptions),
- "dont_inline", OPT_OFFSET(dont_inline),
- "always_inline", OPT_OFFSET(always_inline),
- "optimize_for_size", OPT_OFFSET(optimize_for_size),
+ "dont_inline", OPT_OFFSET(dontinline),
+ "always_inline", OPT_OFFSET(alwaysinline),
+ "optimize_for_size", OPT_OFFSET(optimizesize),
"peephole", OPT_OFFSET(peephole),
- "global_optimizer", OPT_OFFSET(global_optimizer),
- "side_effects", OPT_OFFSET(side_effects),
- "internal", OPT_FLAG_2000 | OPT_OFFSET(internal),
- "import", OPT_FLAG_2000 | OPT_OFFSET(import),
- "export", OPT_FLAG_2000 | OPT_OFFSET(export),
- "lib_export", OPT_FLAG_2000 | OPT_OFFSET(lib_export),
+ "global_optimizer", OPT_OFFSET(globaloptimizer),
+ "side_effects", OPT_OFFSET(sideeffects),
+ "internal", OPT_FLAG_2000 | OPT_OFFSET(cfm_internal),
+ "import", OPT_FLAG_2000 | OPT_OFFSET(cfm_import),
+ "export", OPT_FLAG_2000 | OPT_OFFSET(cfm_export),
+ "lib_export", OPT_FLAG_2000 | OPT_OFFSET(cfm_lib_export),
"nosyminline", OPT_OFFSET(nosyminline),
"force_active", OPT_OFFSET(force_active),
- "sym", OPT_OFFSET(isGeneratingDebugInfo),
+ "sym", OPT_OFFSET(filesyminfo),
NULL, 0
};
-CParams *cparamblkptr;
+CompilerLinkerParamBlk *cparamblkptr;
short tk;
CInt64 tkintconst;
Float tkfloatconst;
@@ -274,7 +274,7 @@ static Macro trgtM;
GList pplist;
struct COptsPush {
struct COptsPush *next;
- COpts opts;
+ CompilerLinkerOptions opts;
};
struct COptPush {
struct COptPush *next;
@@ -284,7 +284,7 @@ struct COptPush {
};
static struct COptsPush *coptpushs;
static struct COptPush *coptpush;
-static COpts *coptssave;
+static CompilerLinkerOptions *coptssave;
static Boolean dofreeaheap;
static GList mlist;
static Handle ts_buffer;
@@ -578,8 +578,8 @@ static Boolean setupfile(StringPtr filename, Boolean flag1, Boolean flag2) {
cannotopenerror(filename, 0);
return 0;
}
- if (file_type == copts.pchType) {
- if (cparamblkptr->isCachingPrecompiledHeaders) {
+ if (file_type == copts.headtype) {
+ if (cparamblkptr->caching_includes) {
if (CWAllocMemHandle(cparamblkptr->context, file_size, 1, &cache_hnd) != cwNoErr) {
if (CWAllocMemHandle(cparamblkptr->context, file_size, 0, &cache_hnd) != cwNoErr) {
COS_FileClose(refnum);
@@ -611,17 +611,17 @@ static Boolean setupfile(StringPtr filename, Boolean flag1, Boolean flag2) {
}
}
} else {
- if (!cparamblkptr->mainFileText) {
- COS_FileGetFSSpecInfo(&cparamblkptr->mainFileSpec, &file_vrefnum, &file_dirid, file_filename);
+ if (!cparamblkptr->sourcetext) {
+ COS_FileGetFSSpecInfo(&cparamblkptr->sourcefile, &file_vrefnum, &file_dirid, file_filename);
cannotopenerror(file_filename, 1);
return 0;
}
- prepinfo.textfile = cparamblkptr->mainFileSpec;
- prepinfo.textbuffer = (char *) cparamblkptr->mainFileText;
- prepinfo.textlength = cparamblkptr->mainFileTextLength;
- prepinfo.fileID = cparamblkptr->mainFileID;
- prepinfo.recordbrowseinfo = cparamblkptr->field276;
+ prepinfo.textfile = cparamblkptr->sourcefile;
+ prepinfo.textbuffer = (char *) cparamblkptr->sourcetext;
+ prepinfo.textlength = cparamblkptr->sourcetextsize;
+ prepinfo.fileID = cparamblkptr->browserfileID;
+ prepinfo.recordbrowseinfo = cparamblkptr->recordbrowseinfo;
}
if (filesp >= 0) {
@@ -1282,7 +1282,7 @@ void CPrep_SetSourceFile(FileOffsetInfo *foi) {
if (foi->file) {
if (foi->file == filestack[0]) {
if (cprep_cursymfile) {
- if (cparamblkptr->isPrecompiling != 1)
+ if (cparamblkptr->precompile != 1)
ObjGen_SrcBreakName(NULL, 0, 0);
cprep_cursymfile = NULL;
}
@@ -1290,7 +1290,7 @@ void CPrep_SetSourceFile(FileOffsetInfo *foi) {
if (cprep_cursymfile != foi->file) {
for (list = cprep_files; list; list = list->next) {
if (foi->file == list->fileinfo) {
- if (cparamblkptr->isPrecompiling != 1)
+ if (cparamblkptr->precompile != 1)
ObjGen_SrcBreakName(list->fileinfo->nameNode, list->fileinfo->fileModDate, 0);
cprep_cursymfile = foi->file;
return;
@@ -1301,7 +1301,7 @@ void CPrep_SetSourceFile(FileOffsetInfo *foi) {
list->next = cprep_files;
cprep_files = list;
list->fileinfo = foi->file;
- if (cparamblkptr->isPrecompiling != 1)
+ if (cparamblkptr->precompile != 1)
ObjGen_SrcBreakName(list->fileinfo->nameNode, list->fileinfo->fileModDate, 1);
cprep_cursymfile = foi->file;
}
@@ -1418,7 +1418,7 @@ void CPrep_GetPrepPos(CPrepFileInfo **file, SInt32 *ppos) {
*ppos = pos - prep_file_start;
}
-UInt8 C_Compiler(CParams *param) {
+UInt8 C_Compiler(CompilerLinkerParamBlk *param) {
TStreamElement ts;
UInt8 code;
@@ -1438,7 +1438,7 @@ UInt8 C_Compiler(CParams *param) {
linetick = COS_GetTicks() + 5;
code = 0;
copts.delete_exception = 1;
- copts.som_call_opt = 1;
+ copts.som_call_optimize = 1;
copts.template_patch = 1;
copts.template_friends = 1;
copts.simple_class_byval = 1;
@@ -1464,7 +1464,7 @@ UInt8 C_Compiler(CParams *param) {
InitNameHash();
setupprep();
CParser_Setup();
- SetupPrecompiler(cparamblkptr->isPrecompiling);
+ SetupPrecompiler(cparamblkptr->precompile);
SetupAssembler();
ObjGen_Setup();
PointerAnalysis_Setup();
@@ -1474,12 +1474,12 @@ UInt8 C_Compiler(CParams *param) {
if (copts.oldprefixname[0])
setupfile(copts.oldprefixname, 1, 0);
- coptssave = galloc(sizeof(COpts));
+ coptssave = galloc(sizeof(CompilerLinkerOptions));
*coptssave = copts;
coptpushs = NULL;
coptpush = NULL;
- preprocessing_only = param->isPreprocessing;
- if (param->isPreprocessing)
+ preprocessing_only = param->preprocess;
+ if (param->preprocess)
CPrep_Preprocess();
else
cparser();
@@ -1500,20 +1500,20 @@ UInt8 C_Compiler(CParams *param) {
}
if (!anyerrors) {
- if (param->isPrecompiling == 1) {
+ if (param->precompile == 1) {
CBrowse_Finish(param);
PrecompilerWrite();
- } else if (!param->isPreprocessing) {
+ } else if (!param->preprocess) {
ObjGen_Finish();
CBrowse_Finish(param);
}
code = 1;
}
- if (param->isPreprocessing) {
- cparamblkptr->objectDataHandle = pplist.data;
+ if (param->preprocess) {
+ cparamblkptr->objectdata = pplist.data;
pplist.data = NULL;
- cparamblkptr->browseDataHandle = NULL;
+ cparamblkptr->browsedata = NULL;
}
} else {
CWDisplayLines(param->context, lines);
@@ -1529,7 +1529,7 @@ UInt8 C_Compiler(CParams *param) {
CBrowse_Cleanup(param);
}
- param->objectdata.compiledlines = lines;
+ param->object.compiledlines = lines;
if (cprep_nomem_exit) {
CompilerGetCString(7, string);
CWReportMessage(cparamblkptr->context, NULL, string, NULL, messagetypeError, 0);
@@ -2003,7 +2003,7 @@ static void CPrep_Define(void) {
}
}
- if (copts.ANSI_strict)
+ if (copts.ANSIstrict)
CPrep_Error(CErrorStr117);
AppendGListByte(&mlist, '#');
pos = ptr17;
@@ -2076,7 +2076,7 @@ static void CPrep_Define(void) {
macro->next = macrohashtable[macro->name->hashval];
macrohashtable[macro->name->hashval] = macro;
- if (cparamblkptr->browseOptions.recordMacros && prep_file->recordbrowseinfo) {
+ if (cparamblkptr->browseoptions.recordMacros && prep_file->recordbrowseinfo) {
CBrowse_NewMacro(macro, prep_file, gDirectiveStart, pos - prep_file_start + 1);
}
@@ -2143,7 +2143,7 @@ static Boolean CPrep_CheckTarget(void) {
return 0;
}
- result = !strcmp(cparams.targetName, tkstring);
+ result = !strcmp(cparams.idetargetname, tkstring);
if (!notendofline()) {
CError_Error(CErrorStr112);
@@ -2185,11 +2185,11 @@ static Boolean CPrep_CheckOption(void) {
}
if (!strcmp(tkidentifier->name, "scheduling")) {
- result = copts.schedule_mode != 0;
+ result = copts.schedule_factor != 0;
} else if (!strcmp(tkidentifier->name, "precompile")) {
- result = cparamblkptr->isPrecompiling == 1;
+ result = cparamblkptr->precompile == 1;
} else if (!strcmp(tkidentifier->name, "preprocess")) {
- result = cparamblkptr->isPreprocessing;
+ result = cparamblkptr->preprocess;
} else {
for (option = compileroptions; option->name; option++) {
if (!strcmp(tkidentifier->name, option->name)) {
@@ -2813,19 +2813,19 @@ static void pragma_on_off_reset(UInt32 bits) {
return;
}
if (flag && !strcmp(tkidentifier->name, "list")) {
- if (cparamblkptr->isPreprocessing) {
+ if (cparamblkptr->preprocess) {
skipendofline();
return;
}
macrocheck = 1;
- if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(internal))
+ if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(cfm_internal))
imex_flags = OBJECT_FLAGS_10;
- else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(import))
+ else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(cfm_import))
imex_flags = OBJECT_FLAGS_20;
- else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(export))
+ else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(cfm_export))
imex_flags = OBJECT_FLAGS_40;
- else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(lib_export))
+ else if ((bits & OPT_OFFSET_MASK) == OPT_OFFSET(cfm_lib_export))
imex_flags = OBJECT_FLAGS_60;
else
CError_FATAL(3610);
@@ -2921,7 +2921,7 @@ static void CPrep_PragmaUnused(void) {
NameSpaceObjectList *list;
short t;
- if (cparamblkptr->isPreprocessing) {
+ if (cparamblkptr->preprocess) {
skipendofline();
return;
}
@@ -2994,7 +2994,7 @@ static void CPrep_PragmaInlineMaxSize(void) {
if (notendofline() && plex() == '(' && notendofline()) {
switch (plex()) {
case TK_INTCONST:
- copts.inline_max_size = CInt64_GetULong(&tkintconst);
+ copts.inlinemaxsize = CInt64_GetULong(&tkintconst);
break;
default:
CPrep_Warning(CErrorStr186);
@@ -3019,7 +3019,7 @@ static void CPrep_PragmaInlineMaxTotalSize(void) {
if (notendofline() && plex() == '(' && notendofline()) {
switch (plex()) {
case TK_INTCONST:
- copts.inline_max_total_size = CInt64_GetULong(&tkintconst);
+ copts.inlinemaxtotalsize = CInt64_GetULong(&tkintconst);
break;
default:
CPrep_Warning(CErrorStr186);
@@ -3061,7 +3061,7 @@ static void pragma_segment(void) {
if (!i || i >= 255)
CPrep_Warning(CErrorStr186);
- copts.forcedSegment = GetHashNameNodeExport(name);
+ copts.cursegmentname = GetHashNameNodeExport(name);
ObjGen_SegmentName();
} else {
if (copts.warn_illpragma)
@@ -3072,22 +3072,22 @@ static void pragma_segment(void) {
static void pragma_options(void) {
if (notendofline() && plex() == TK_IDENTIFIER && !strcmp(tkidentifier->name, "align") && notendofline() && plex() == '=' && notendofline() && plex() == TK_IDENTIFIER) {
if (!strcmp(tkidentifier->name, "reset")) {
- CPrep_PopOption(OPT_OFFSET(align_mode));
+ CPrep_PopOption(OPT_OFFSET(structalignment));
goto done;
} else if (!strcmp(tkidentifier->name, "native")) {
- CPrep_PushOption(OPT_OFFSET(align_mode), AlignMode2_PPC);
+ CPrep_PushOption(OPT_OFFSET(structalignment), AlignMode2_PPC);
goto done;
} else if (!strcmp(tkidentifier->name, "mac68k")) {
- CPrep_PushOption(OPT_OFFSET(align_mode), AlignMode0_Mac68k);
+ CPrep_PushOption(OPT_OFFSET(structalignment), AlignMode0_Mac68k);
goto done;
} else if (!strcmp(tkidentifier->name, "mac68k4byte")) {
- CPrep_PushOption(OPT_OFFSET(align_mode), AlignMode1_Mac68k4byte);
+ CPrep_PushOption(OPT_OFFSET(structalignment), AlignMode1_Mac68k4byte);
goto done;
} else if (!strcmp(tkidentifier->name, "power")) {
- CPrep_PushOption(OPT_OFFSET(align_mode), AlignMode2_PPC);
+ CPrep_PushOption(OPT_OFFSET(structalignment), AlignMode2_PPC);
goto done;
} else if (!strcmp(tkidentifier->name, "packed")) {
- CPrep_PushOption(OPT_OFFSET(align_mode), AlignMode8_Packed);
+ CPrep_PushOption(OPT_OFFSET(structalignment), AlignMode8_Packed);
goto done;
}
}
@@ -3127,7 +3127,7 @@ static void pragma_pop(void) {
static void pragma_overload(void) {
Object *obj;
- if (cparamblkptr->isPreprocessing) {
+ if (cparamblkptr->preprocess) {
skipendofline();
return;
}
@@ -3192,7 +3192,7 @@ static void pragma_opt_unroll_count(void) {
if (t == TK_INTCONST) {
lv = CInt64_GetULong(&tkintconst);
if (lv >= 0 && lv <= 127) {
- CPrep_PushOption(OPT_OFFSET(loop_unroll_count), lv);
+ CPrep_PushOption(OPT_OFFSET(unrollfactor), lv);
CodeGen_UpdateOptimizerOptions();
CodeGen_UpdateBackEndOptions();
} else {
@@ -3200,7 +3200,7 @@ static void pragma_opt_unroll_count(void) {
skipendofline();
}
} else if (t == TK_IDENTIFIER && !strcmp(tkidentifier->name, "reset")) {
- CPrep_PopOption(OPT_OFFSET(loop_unroll_count));
+ CPrep_PopOption(OPT_OFFSET(unrollfactor));
CodeGen_UpdateOptimizerOptions();
CodeGen_UpdateBackEndOptions();
} else {
@@ -3223,7 +3223,7 @@ static void pragma_opt_unroll_instr_count(void) {
if (t == TK_INTCONST) {
lv = CInt64_GetULong(&tkintconst);
if (lv >= 0 && lv <= 127) {
- CPrep_PushOption(OPT_OFFSET(loop_unroll_size_threshold), lv);
+ CPrep_PushOption(OPT_OFFSET(unrollinstrfactor), lv);
CodeGen_UpdateOptimizerOptions();
CodeGen_UpdateBackEndOptions();
} else {
@@ -3231,7 +3231,7 @@ static void pragma_opt_unroll_instr_count(void) {
skipendofline();
}
} else if (t == TK_IDENTIFIER && !strcmp(tkidentifier->name, "reset")) {
- CPrep_PopOption(OPT_OFFSET(loop_unroll_size_threshold));
+ CPrep_PopOption(OPT_OFFSET(unrollinstrfactor));
CodeGen_UpdateOptimizerOptions();
CodeGen_UpdateBackEndOptions();
} else {
@@ -3254,7 +3254,7 @@ static void pragma_pack(void) {
if (notendofline() && plex() == '(') {
macrocheck = 1;
if (notendofline() && ((t = plex()) == ')')) {
- copts.align_mode = coptssave->align_mode;
+ copts.structalignment = coptssave->structalignment;
} else {
did_push = did_pop = 0;
do {
@@ -3263,14 +3263,14 @@ static void pragma_pack(void) {
if (cprep_packstackp) {
cprep_packstackp--;
cprep_packstack[cprep_packstackp].identifier = NULL;
- cprep_packstack[cprep_packstackp].align_mode = copts.align_mode;
+ cprep_packstack[cprep_packstackp].align_mode = copts.structalignment;
did_push = 1;
} else {
CPrep_Warning(CErrorStr186);
}
} else if (!strcmp(tkidentifier->name, "pop")) {
if (cprep_packstackp < 128) {
- copts.align_mode = cprep_packstack[cprep_packstackp].align_mode;
+ copts.structalignment = cprep_packstack[cprep_packstackp].align_mode;
cprep_packstackp++;
did_pop = 1;
} else {
@@ -3285,7 +3285,7 @@ static void pragma_pack(void) {
break;
}
if (i < 128) {
- copts.align_mode = cprep_packstack[i].align_mode;
+ copts.structalignment = cprep_packstack[i].align_mode;
cprep_packstackp = i + 1;
} else {
CPrep_Warning(CErrorStr186);
@@ -3300,22 +3300,22 @@ static void pragma_pack(void) {
if (t == TK_INTCONST) {
switch (CInt64_GetULong(&tkintconst)) {
case 0:
- copts.align_mode = coptssave->align_mode;
+ copts.structalignment = coptssave->structalignment;
break;
case 1:
- copts.align_mode = AlignMode3_1Byte;
+ copts.structalignment = AlignMode3_1Byte;
break;
case 2:
- copts.align_mode = AlignMode4_2Byte;
+ copts.structalignment = AlignMode4_2Byte;
break;
case 4:
- copts.align_mode = AlignMode5_4Byte;
+ copts.structalignment = AlignMode5_4Byte;
break;
case 8:
- copts.align_mode = AlignMode6_8Byte;
+ copts.structalignment = AlignMode6_8Byte;
break;
case 16:
- copts.align_mode = AlignMode7_16Byte;
+ copts.structalignment = AlignMode7_16Byte;
break;
default:
if (copts.warn_illpragma)
@@ -4098,7 +4098,7 @@ static void prepelse(void) {
return;
}
- if (!copts.ANSI_strict)
+ if (!copts.ANSIstrict)
skipendofline();
else
goendofline();
@@ -4127,7 +4127,7 @@ static void prependif(void) {
}
macrocheck = 0;
- if (!copts.ANSI_strict)
+ if (!copts.ANSIstrict)
skipendofline();
else
goendofline();
@@ -4264,7 +4264,7 @@ void preprocessor(void) {
macrocheck = 1;
return;
}
- if (!copts.ANSI_strict) {
+ if (!copts.ANSIstrict) {
if (!strcmp("warning", tkidentifier->name)) {
CPrep_Warning(CErrorStr337);
skipendofline();
@@ -4307,7 +4307,7 @@ void preprocessor(void) {
prependif();
return;
}
- if (copts.objective_c || !copts.ANSI_strict) {
+ if (copts.objective_c || !copts.ANSIstrict) {
if (!strcmp("import", tkidentifier->name)) {
prepinclude(1);
macrocheck = 1;
diff --git a/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c b/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c
index 4c36aab..6d66b9d 100644
--- a/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c
+++ b/compiler_and_linker/FrontEnd/C/CPrepTokenizer.c
@@ -81,7 +81,7 @@ loop:
}
}
if (tokenstacklevel <= 0) {
- if (p[0] == '/' && (!copts.ANSI_strict || copts.cplusplus || copts.c9x)) {
+ if (p[0] == '/' && (!copts.ANSIstrict || copts.cplusplus || copts.c9x)) {
spaceskip = 1;
nextcharpos = (char *) CPrep_SkipNewComment(p + 1);
return CPrep_SkipNewCommentChar;
@@ -224,7 +224,7 @@ loop:
p += 2;
}
}
- if (p[0] == '/' && (!copts.ANSI_strict || copts.cplusplus)) {
+ if (p[0] == '/' && (!copts.ANSIstrict || copts.cplusplus)) {
spaceskip = 1;
pos = (char *) CPrep_SkipNewComment(p + 1);
return CPrep_SkipNewCommentChar;
@@ -676,7 +676,7 @@ static short intsuffix(short token, Boolean flag) {
break;
case 'i':
case 'I':
- if (copts.cpp_extensions && !copts.ANSI_strict && copts.longlong) {
+ if (copts.cpp_extensions && !copts.ANSIstrict && copts.longlong) {
pos = nextcharpos;
t = prepcurchar();
if (t == '6') {
@@ -745,7 +745,7 @@ static short floatsuffix(short token) {
break;
case 'd':
case 'D':
- if (!copts.ANSI_strict) {
+ if (!copts.ANSIstrict) {
pos = nextcharpos;
token = *pos;
whichtype = IT_DOUBLE;
@@ -1001,7 +1001,7 @@ void skipendofline(void) {
}
}
- if (*p == '/' && (!copts.ANSI_strict || copts.cplusplus)) {
+ if (*p == '/' && (!copts.ANSIstrict || copts.cplusplus)) {
// EOL comment
pos = (char *) CPrep_SkipNewComment(p + 1);
if (CPrep_SkipNewCommentChar == '\r')
@@ -1133,7 +1133,7 @@ static short tapos(short _t) {
CError_FATAL(1386);
}
} else {
- if (copts.unsignedchars)
+ if (copts.unsigned_char)
t &= 0xFF;
CInt64_SetLong(&tkintconst, t);
tksize = copts.cplusplus ? IT_SCHAR : IT_INT;
@@ -1556,7 +1556,7 @@ static short tzero(short t) {
if (pos == p)
CError_Error(CErrorStr105);
pos = p;
- } else if (!copts.ANSI_strict && (ch == 'b' || ch == 'B')) {
+ } else if (!copts.ANSIstrict && (ch == 'b' || ch == 'B')) {
p = CInt64_ScanBinString(&tkintconst, pos, &failed);
if (pos == p)
CError_Error(CErrorStr105);
@@ -1691,7 +1691,7 @@ static short tchra(void) {
return 0;
if (!strcmp("auto", tkidentifier->name))
return TK_AUTO;
- if ((copts.cplusplus || !copts.only_std_keywords) && !strcmp("asm", tkidentifier->name))
+ if ((copts.cplusplus || !copts.onlystdkeywords) && !strcmp("asm", tkidentifier->name))
return TK_ASM;
if (copts.cplusplus && !in_assembler && !preprocessing_only) {
if (!strcmp("and", tkidentifier->name))
@@ -1845,7 +1845,7 @@ static short tchri(void) {
if (copts.cplusplus || copts.c9x) {
if (!strcmp("inline", tkidentifier->name))
return TK_INLINE;
- } else if (!copts.only_std_keywords) {
+ } else if (!copts.onlystdkeywords) {
if (!strcmp("inline", tkidentifier->name))
return TK_INLINE;
}
@@ -1933,7 +1933,7 @@ static short tchrp(short t) {
pos = ReadIdentifier(pos - 1);
if (macrocheck && macrotest())
return 0;
- if (!copts.only_std_keywords && !strcmp("pascal", tkidentifier->name))
+ if (!copts.onlystdkeywords && !strcmp("pascal", tkidentifier->name))
return TK_PASCAL;
if (copts.cplusplus && t == 'p') {
if (!strcmp("private", tkidentifier->name))