Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===================================================================
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(revision 2930)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java	(working copy)
@@ -142,6 +142,7 @@
 	private boolean driveOnLeft;
 	private boolean driveOnRight;
 	private final boolean checkRoundabouts;
+	private int reportDeadEnds;
 	private final boolean linkPOIsToWays;
 	private final boolean mergeRoads;
 
@@ -174,7 +175,8 @@
 			NODHeader.setDriveOnLeft(driveOnLeft);
 		driveOnRight = props.getProperty("drive-on-right") != null;
 		checkRoundabouts = props.getProperty("check-roundabouts") != null;
-
+		reportDeadEnds = props.getProperty("report-dead-ends", 1); 
+		
 		LineAdder overlayAdder = style.getOverlays(lineAdder);
 		if (overlayAdder != null)
 			lineAdder = overlayAdder;
@@ -264,7 +266,17 @@
 					if (checkFixmeCoords(way))
 						way.addTag("mkgmap:dead-end-check", "false");
 				}
-		    	
+				String oneWay = way.getTag("oneway");
+				if("-1".equals(oneWay) || "reverse".equals(oneWay)) {
+					// it's a oneway street in the reverse direction
+					// so reverse the order of the nodes and change
+					// the oneway tag to "yes"
+					way.reverse();
+					way.addTag("oneway", "yes");
+					if("roundabout".equals(way.getTag("junction")))
+						log.warn("Roundabout", way.getId(), "has reverse oneway tag (" + way.getPoints().get(0).toOSMURL() + ")");
+				}
+
 		    	roads.add(way);
 		    	roadTypes.add(new GType(foundType));
 		    }
@@ -1089,17 +1101,6 @@
 			return;
 		}
 
-		String oneWay = way.getTag("oneway");
-		if("-1".equals(oneWay) || "reverse".equals(oneWay)) {
-			// it's a oneway street in the reverse direction
-			// so reverse the order of the nodes and change
-			// the oneway tag to "yes"
-			way.reverse();
-			way.addTag("oneway", "yes");
-			if("roundabout".equals(way.getTag("junction")))
-				log.warn("Roundabout", way.getId(), "has reverse oneway tag (" + way.getPoints().get(0).toOSMURL() + ")");
-		}
-
 		checkRoundabout(way);
 		addNodesForRestrictions(way);
 
@@ -1938,6 +1939,51 @@
 		// find roads that are not connected
 		for (int i = 0; i < roads.size(); i++){
 			Way way = roads.get(i);
+			if(reportDeadEnds > 0){
+				if (way.isBoolTag("oneway") && !way.isNotBoolTag("mkgmap:dead-end-check")) {
+					if (way.hasIdenticalEndPoints())
+						continue;
+					int pos = 0;
+					if (way.getId() == 201109766){
+						long dd = 4;
+					}
+					while(true){
+						boolean isDeadEnd = true;
+						Coord p = way.getPoints().get(pos);
+						if (bbox.contains(p) == false)
+							isDeadEnd = false;
+						else if (p.getHighwayCount() > 1){
+							HashSet<Way> ways = connectors.get(p);
+							for (Way connectedWay: ways){
+								if (!isDeadEnd)
+									break;
+								if (way == connectedWay)
+									continue;
+								if (connectedWay.hasIdenticalEndPoints() || connectedWay.isBoolTag("oneway") == false)
+									isDeadEnd = false;
+								else {
+									Coord pOther;
+									if (pos != 0)
+										pOther = connectedWay.getPoints().get(connectedWay.getPoints().size()-1);
+									else
+										pOther = connectedWay.getPoints().get(0);
+									if (p != pOther){
+										// way is connected to a point on a oneway which allows going on
+										isDeadEnd = false;
+									}
+								}
+							}
+						}
+						if (isDeadEnd){
+							log.warn("Oneway road " + way.getId() + " with tags " + way.toTagString() + ((pos==0) ? " comes from":" goes to") + " nowhere at " + p.toOSMURL());
+						}
+						if (pos != 0 || reportDeadEnds == 1)
+							break;
+						pos = way.getPoints().size()-1; 
+					}
+				}
+			}
+
 			String check_type = way.getTag("mkgmap:set_unconnected_type");
 			if (check_type != null){
 				boolean isConnected = false;
