--- /dev/null
+[-Wempty-character-class]
+--------------------------
+
+.. include:: ../home.rst
+
+This warning is complementary to ``--empty-class`` option.
+The option expects a single argument, one of the following:
+
+* ``match-empty`` (default): empty character class matches empty string
+ (that is, always matches and consumes no code units).
+ This attitude is strange; however, some real-world programs rely on it.
+
+* ``match-none``: empty character class never matches.
+ This is what logic suggests.
+
+* ``error``: empty character class is an error.
+
+The ``[-Wempty-character-class]`` warning is a reminder for those
+who are not aware of ``--empty-class`` option.
+
+Note that empty character class can be constructed in many ways:
+
+.. code-block:: cpp
+ :number-lines:
+
+ /*!re2c
+ [] { return 0; }
+ [^\x00-\xFF] { return 1; }
+ [^] \ [^] { return 2; }
+ [abc] \ ("a" | "b" | "c") { return 3; }
+ "a" \ [a-z] { return 4; }
+ */
+
+Given this code, ```re2c -i -Wempty-character-class``` generates:
+
+.. code-block:: cpp
+ :number-lines:
+
+ /* Generated by re2c 0.14.1.dev on Wed Nov 11 11:42:00 2015*/
+
+ {
+ YYCTYPE yych;
+ { return 0; }
+ }
+
+And warns:
+
+.. code-block::
+
+ re2c: warning: line 2: empty character class [-Wempty-character-class]
+ re2c: warning: line 3: empty character class [-Wempty-character-class]
+ re2c: warning: line 4: empty character class [-Wempty-character-class]
+ re2c: warning: line 5: empty character class [-Wempty-character-class]
+ re2c: warning: line 6: empty character class [-Wempty-character-class]
+
+
* `[-Wcondition-order] <condition_order/wcondition_order.html>`_
* `[-Wuseless-escape] <useless_escape/wuseless_escape.html>`_
* `[-Wswapped-range] <swapped_range/wswapped_range.html>`_
-* `[-Wempty-character-class] <wempty_character_class.html>`_
+* `[-Wempty-character-class] <empty_character_class/wempty_character_class.html>`_
* `[-Wmatch-empty-string] <wmatch_empty_string.html>`_
.. include:: warnings_general.rst