diff --git a/.gitattributes b/.gitattributes
index 40691b6a78..dea2c08371 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -4575,6 +4575,7 @@ tests/tbf/tb0174b.pp svneol=native#text/plain
 tests/tbf/tb0174c.pp svneol=native#text/plain
 tests/tbf/tb0174d.pp svneol=native#text/plain
 tests/tbf/tb0175.pp svneol=native#text/plain
+tests/tbf/tb0176.pp svneol=native#text/plain
 tests/tbf/ub0115.pp svneol=native#text/plain
 tests/tbf/ub0149.pp svneol=native#text/plain
 tests/tbf/ub0158a.pp svneol=native#text/plain
@@ -6311,6 +6312,7 @@ tests/webtbs/tw4209.pp svneol=native#text/plain
 tests/webtbs/tw4215.pp svneol=native#text/plain
 tests/webtbs/tw4219.pp svneol=native#text/plain
 tests/webtbs/tw4223.pp svneol=native#text/plain
+tests/webtbs/tw4229.pp -text svneol=unset#text/plain
 tests/webtbs/tw4233.pp svneol=native#text/plain
 tests/webtbs/tw4234.pp svneol=native#text/plain
 tests/webtbs/tw4234a.pp svneol=native#text/plain
diff --git a/compiler/pexpr.pas b/compiler/pexpr.pas
index 2f3cde9aa8..9311a0035b 100644
--- a/compiler/pexpr.pas
+++ b/compiler/pexpr.pas
@@ -2346,6 +2346,9 @@ implementation
              begin
                consume(_PLUS);
                p1:=factor(false);
+               { we must generate a new node to do 0+<p1> otherwise the + will
+                 not be checked }
+               p1:=caddnode.create(addn,genintconstnode(0),p1);
              end;
 
            _MINUS :
diff --git a/tests/tbf/tb0176.pp b/tests/tbf/tb0176.pp
new file mode 100644
index 0000000000..dd8bb6249d
--- /dev/null
+++ b/tests/tbf/tb0176.pp
@@ -0,0 +1,9 @@
+{ %fail }
+
+{$mode objfpc} {$H+}
+begin
+   + ParamStr(0);
+   + ParamCount;
+   + Exit;
+   + WriteLN;
+end.
diff --git a/tests/webtbs/tw4229.pp b/tests/webtbs/tw4229.pp
new file mode 100755
index 0000000000..22e518cf9f
--- /dev/null
+++ b/tests/webtbs/tw4229.pp
@@ -0,0 +1,30 @@
+{ Source provided for Free Pascal Bug Report 4229 }
+{ Submitted by "Gerhard" on  2005-07-28 }
+{ e-mail: gs@g--s.de }
+unit tw4229 ;
+
+interface
+
+  type
+    strobj = object
+               bs : string ;
+               ba : ansistring ;
+              end ;
+
+  operator := ( const a : ansistring ) z : strobj ;
+
+implementation
+
+  operator := ( const s : string ) z : strobj ;
+
+    begin
+      z.bs := s ;
+     end ;
+
+  operator := ( const a : ansistring ) z : strobj ;
+
+    begin
+      z.ba := a ;
+     end ;
+
+end.