From c3610aa971d2894c9eeded09552320bf7fb03a82 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 5 Mar 2018 20:08:17 +0100 Subject: [PATCH 1/3] Updated from Visual Studio 2013 to Visual Studio 2015. --- src/.gitignore | 2 ++ src/ar65.vcxproj | 6 +++--- src/ca65.vcxproj | 6 +++--- src/cc65.vcxproj | 6 +++--- src/chrcvt65.vcxproj | 6 +++--- src/cl65.vcxproj | 6 +++--- src/co65.vcxproj | 6 +++--- src/common.vcxproj | 6 +++--- src/da65.vcxproj | 6 +++--- src/grc65.vcxproj | 6 +++--- src/ld65.vcxproj | 6 +++--- src/od65.vcxproj | 6 +++--- src/sim65.vcxproj | 6 +++--- src/sp65.vcxproj | 6 +++--- 14 files changed, 41 insertions(+), 39 deletions(-) diff --git a/src/.gitignore b/src/.gitignore index d2b9fe751..a2c8bb5d4 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -2,5 +2,7 @@ ipch/ *.suo *.sdf *.opensdf +*.VC.db +*.VC.VC.opendb *.vcxproj.filters *.vcxproj.user diff --git a/src/ar65.vcxproj b/src/ar65.vcxproj index b077134ce..003a5fa69 100644 --- a/src/ar65.vcxproj +++ b/src/ar65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/ca65.vcxproj b/src/ca65.vcxproj index 4e02fa2a9..fb7cf2e26 100644 --- a/src/ca65.vcxproj +++ b/src/ca65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/cc65.vcxproj b/src/cc65.vcxproj index 70f43dc73..12573e862 100644 --- a/src/cc65.vcxproj +++ b/src/cc65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/chrcvt65.vcxproj b/src/chrcvt65.vcxproj index 1daf7cae9..d120399d1 100644 --- a/src/chrcvt65.vcxproj +++ b/src/chrcvt65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/cl65.vcxproj b/src/cl65.vcxproj index 64c1126b1..b6ceb161a 100644 --- a/src/cl65.vcxproj +++ b/src/cl65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/co65.vcxproj b/src/co65.vcxproj index c66c8aac8..89eed36e1 100644 --- a/src/co65.vcxproj +++ b/src/co65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/common.vcxproj b/src/common.vcxproj index 39fea35e5..644d6da85 100644 --- a/src/common.vcxproj +++ b/src/common.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -115,13 +115,13 @@ StaticLibrary true - v120 + v140 false true StaticLibrary - v120 + v140 diff --git a/src/da65.vcxproj b/src/da65.vcxproj index 2695edc08..06af7505d 100644 --- a/src/da65.vcxproj +++ b/src/da65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/grc65.vcxproj b/src/grc65.vcxproj index 211ad7cce..afac0cce1 100644 --- a/src/grc65.vcxproj +++ b/src/grc65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/ld65.vcxproj b/src/ld65.vcxproj index acb9b4240..cc5598aad 100644 --- a/src/ld65.vcxproj +++ b/src/ld65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/od65.vcxproj b/src/od65.vcxproj index c788ac961..2ace26001 100644 --- a/src/od65.vcxproj +++ b/src/od65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/sim65.vcxproj b/src/sim65.vcxproj index f87b4db6b..9ba0980ba 100644 --- a/src/sim65.vcxproj +++ b/src/sim65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 diff --git a/src/sp65.vcxproj b/src/sp65.vcxproj index 8db98346c..6e7d992d4 100644 --- a/src/sp65.vcxproj +++ b/src/sp65.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -18,12 +18,12 @@ true - v120 + v140 false true - v120 + v140 From 19f3229f45262da83c910650c382f5bdd510d022 Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 5 Mar 2018 20:44:32 +0100 Subject: [PATCH 2/3] Made 'wrapped call' code build with VS 2015. --- src/cc65/pragma.c | 2 +- src/cc65/wrappedcall.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cc65/pragma.c b/src/cc65/pragma.c index 25bc29d43..64ea4a1aa 100644 --- a/src/cc65/pragma.c +++ b/src/cc65/pragma.c @@ -525,7 +525,7 @@ static void WrappedCallPragma (StrBuf* B) /* Check if the name is valid */ if (Entry && Entry->Flags & SC_FUNC) { - PushWrappedCall(Entry, Val); + PushWrappedCall(Entry, (unsigned char) Val); Entry->Flags |= SC_REF; Entry->V.F.Func->Flags |= FD_CALL_WRAPPER; diff --git a/src/cc65/wrappedcall.c b/src/cc65/wrappedcall.c index 2d11245fd..18cb507ac 100644 --- a/src/cc65/wrappedcall.c +++ b/src/cc65/wrappedcall.c @@ -97,6 +97,6 @@ void GetWrappedCall (void **Ptr, unsigned char *Val) } else { long Temp; IPS_Get (&WrappedCalls, &Temp, Ptr); - *Val = Temp; + *Val = (unsigned char) Temp; } } From bc58bf572cf317f54580018cf12968693768228d Mon Sep 17 00:00:00 2001 From: Oliver Schmidt Date: Mon, 5 Mar 2018 22:31:10 +0100 Subject: [PATCH 3/3] Fixed -W cmdline option handling. Reverted part of https://github.com/cc65/cc65/commit/3157e4be1ec7f2a5ac61ca45b232cd07c5e30483 as it actually introduced a regression. It doesn't make sense to check for Arg[3] == '\0' _before_ checking Arg[2] != '\0'. This made the Win32 builds fail to correctly parse e.g. cl65 -W unused-var test.c --- src/cl65/main.c | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) diff --git a/src/cl65/main.c b/src/cl65/main.c index 5a2103b24..afd3e97e3 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -1444,35 +1444,24 @@ int main (int argc, char* argv []) /* Print version number */ OptVersion (Arg, 0); break; - + case 'E': /* Forward -E to compiler */ CmdAddArg (&CC65, Arg); DisableAssemblingAndLinking (); break; - + case 'W': - /* avoid && with'\0' in if clauses */ - if (Arg[3] == '\0') { - switch (Arg[2]) { - case 'a': - /* -Wa: Pass options to assembler */ - OptAsmArgs (Arg, GetArg (&I, 3)); - break; - case 'c': - /* -Wc: Pass options to compiler - ** Remember -Wc sub arguments in cc65 arg struct - */ - OptCCArgs (Arg, GetArg (&I, 3)); - break; - case 'l': - /* -Wl: Pass options to linker */ - OptLdArgs (Arg, GetArg (&I, 3)); - break; - default: - UnknownOption (Arg); - break; - } + if (Arg[2] == 'a' && Arg[3] == '\0') { + /* -Wa: Pass options to assembler */ + OptAsmArgs (Arg, GetArg (&I, 3)); + } else if (Arg[2] == 'c' && Arg[3] == '\0') { + /* -Wc: Pass options to compiler */ + /* Remember -Wc sub arguments in cc65 arg struct */ + OptCCArgs (Arg, GetArg (&I, 3)); + } else if (Arg[2] == 'l' && Arg[3] == '\0') { + /* -Wl: Pass options to linker */ + OptLdArgs (Arg, GetArg (&I, 3)); } else { /* Anything else: Suppress warnings (compiler) */ CmdAddArg2 (&CC65, "-W", GetArg (&I, 2));