shithub: scc

Download patch

ref: 74ee2f1cfd945b0d3a53cdea44aaac9a08eef75d
parent: d0e5ea2107b6e7ebe743a4f6eb5be4953cdf519d
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Dec 11 07:49:20 EST 2016

Fix some errors in README

There a few problems in README about volatile and const. They are fixed
now although we should change the text to show that we want to implement
volatile in the future.

--- a/README
+++ b/README
@@ -10,8 +10,8 @@
 Type qualifers make the type system ugly, and their uselessness add
 unnecessary complexity to the compiler (and increased compilation time):
 	- const: The definition of const is not clear in the standard.
-	  If a const value is modified the behaviour is implementation
-	  defined. It seems it was defined in order to be able to
+	  If a const value is modified the behaviour is undefined
+	  behaviour. It seems it was defined in order to be able to
 	  allocate variables in ROM rather than error detection. This
 	  implememtation will not warn about these modifications and
 	  the compiler will treat them like normal variables (the standard
@@ -22,13 +22,13 @@
 	  volatile have undefined state) and for memory mapped registers
 	  or variables whose values are modified asynchronously. This can
 	  be achieved with special pragma values though.
-	  In the first case, this is non-portable code by definition
+	  In the first case, it generates a lot of problems with modern
+	  processors and multithreading, where not holding the value in a
+	  register is not good enough (an explicit memory barrier is needed).
+	  In the second case, this is non-portable code by definition
 	  (depending on the register mapped), so it is better to deal with
 	  it using another solution (compiler extensions or direct
 	  assembler).
-	  In the second case, it generates a lot of problems with modern
-	  processors and multithreading, where not holding the value in a
-	  register is not good enough (an explicit memory barrier is needed).
 
 	- restrict: This qualifer can only be applied to pointers to
 	  mark that the pointed object has no other alias. This qualifer