--- /dev/null
+[-Wswapped-range]
+--------------------------
+
+.. include:: ../home.rst
+
+This warning is very simple.
+It warns you in cases when character class contains a range which lower bound is greater than upper bound.
+For some strange reason re2c never considered it an error:
+it simply swaps range bounds and goes on.
+
+.. code-block:: cpp
+ :number-lines:
+
+ /*!re2c
+ * { return "*"; }
+ [a-Z] { return "is it what you want?"; }
+ */
+
+Given this code, ```re2c -i -Wswapped-range``` generates the following:
+
+.. code-block:: cpp
+ :number-lines:
+
+ /* Generated by re2c 0.14.1.dev on Tue Nov 10 22:07:31 2015*/
+
+ {
+ YYCTYPE yych;
+ if (YYLIMIT <= YYCURSOR) YYFILL(1);
+ yych = *YYCURSOR;
+ switch (yych) {
+ case 'Z':
+ case '[':
+ case '\\':
+ case ']':
+ case '^':
+ case '_':
+ case '`':
+ case 'a': goto yy4;
+ default: goto yy2;
+ }
+ yy2:
+ ++YYCURSOR;
+ { return "*"; }
+ yy4:
+ ++YYCURSOR;
+ { return "is it what you want?"; }
+ }
+
+And reports a warning:
+
+.. code-block::
+
+ re2c: warning: line 3: range lower bound (0x61) is greater than upper bound (0x5A), swapping [-Wswapped-range]
+
+Use ``[-Werror-swapped-range]`` to make it an error.
+
+
* `[-Wunreachable-rules] <unreachable_rules/wunreachable_rules.html>`_
* `[-Wcondition-order] <condition_order/wcondition_order.html>`_
* `[-Wuseless-escape] <useless_escape/wuseless_escape.html>`_
-* `[-Wswapped-range] <wswapped_range.html>`_
+* `[-Wswapped-range] <swapped_range/wswapped_range.html>`_
* `[-Wempty-character-class] <wempty_character_class.html>`_
* `[-Wmatch-empty-string] <wmatch_empty_string.html>`_