Comments (5)
Doesn't seem right to me, now the original code reports "warning XS9076: Empty CASE statement", but isn't that incorrect? There's no empty CASE statement, there's no CASE statement at all, so this should be an error, shouldn't it?
Also there are no warnings at all reported for empty CASE, IF etc statements, I think there used to be one in previous builds:
FUNCTION Start( ) AS VOID
// warning XS9076: Empty CASE statement
DO CASE
END CASE
// no warnings at all below:
DO CASE
CASE FALSE
CASE TRUE
ENDCASE
IF TRUE
ELSE
ENDIF
from xsharppublic.
Chris,
It depends on what you call a CASE Statement
For me, that is the total DO CASE .. CASE .. OTHERWISE .. ENDCASE
construct.
CASE something
is a clause in the CASE statement.
I will change the message to 'DO CASE' statement and will also try to produce a message for the empty statement lists inside a CASE clause and inside IF, ELSEIF and ELSE.
from xsharppublic.
Robert,
I think there used to be a warning for empty clauses and that's why we introduced the NOP instruction, didn't we?
Just checked and our runtime code is full of NOPs, I assume for that reason. Apparently this warning stopped being reported in one of the previous builds.
Btw, same goes for TRY...END and empty CATCH and FINALLY clauses
from xsharppublic.
I have added warnings for empty blocks, and now many of our compiler tests produce a warning.
I will add NOP statements in the tests to take care of this.
from xsharppublic.
Confirmed fixed
from xsharppublic.
Related Issues (20)
- VS : Project setting "enable named arguments" checkbox does not reflect xsproj HOT 2
- INSTANCE field inconsistency with and without SELF HOT 1
- VOXPorter problem with unterminated block comment in textblock
- Problem with OrdKeyVal() and ADS/ADT HOT 1
- Harbour dialect missing commands HOT 2
- Harbour dialect FIELD statement not supported HOT 5
- Duplicate DEFINEs and functions in the runtime, SDK and RP2
- VO incompatibility with longer order names HOT 5
- Out of process Winforms designer in VS2022 17.9.2 is not working HOT 1
- SetColor() function does not allow omitting argument
- Output in Debugger of Action "CALLSTACK" does not show line numbers HOT 5
- Code generator for types in external assemblies does not generate parameters for Indexed properties HOT 1
- Use of reserved word in x#/core HOT 4
- Error 5041: The requested object was not found. Key not found. HOT 29
- Macro compiler problem passing more than 2 arguments by reference HOT 2
- Compatibility problem (?) creating dbf with DBFNTX driver HOT 2
- RP3 Invalid operation exception when printing from the preview window HOT 1
- DBSetIndex() sets record pointer at eof HOT 1
- Problem reading fields from dbf created with SetAnsi == FALSE HOT 1
- Problem with the /vo9 (handle missing RETURN statements) option with ACCESS in PARTIAL classes HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xsharppublic.