diff --git a/src/cc65/declare.c b/src/cc65/declare.c
index fbbe5529d..40235ea84 100644
--- a/src/cc65/declare.c
+++ b/src/cc65/declare.c
@@ -1167,6 +1167,13 @@ static void ParseAnsiParamList (FuncDesc* F)
 	/* Create a symbol table entry */
 	AddLocalSym (Decl.Ident, ParamTypeCvt (Decl.Type), Decl.StorageClass, 0);
 
+        /* If the parameter is a struct or union, emit a warning */
+        if (IsClassStruct (Decl.Type)) {
+            if (IS_Get (&WarnStructParam)) {
+                Warning ("Passing struct by value for parameter `%s'", Decl.Ident);
+            }
+        }
+
 	/* Count arguments */
        	++F->ParamCount;
 
diff --git a/src/cc65/error.c b/src/cc65/error.c
index 95549216b..f73f0a4a0 100644
--- a/src/cc65/error.c
+++ b/src/cc65/error.c
@@ -63,6 +63,7 @@ unsigned WarningCount	= 0;
 /* Warning and error options */
 IntStack WarnEnable         = INTSTACK(1);  /* Enable warnings */
 IntStack WarningsAreErrors  = INTSTACK(0);  /* Treat warnings as errors */
+IntStack WarnStructParam    = INTSTACK(1);  /* Warn about structs passed by val */
 IntStack WarnUnusedLabel    = INTSTACK(1);  /* Warn about unused labels */
 IntStack WarnUnusedParam    = INTSTACK(1);  /* Warn about unused parameters */
 IntStack WarnUnusedVar      = INTSTACK(1);  /* Warn about unused variables */
@@ -77,6 +78,7 @@ struct WarnMapEntry {
 static WarnMapEntry WarnMap[] = {
     /* Keep sorted, even if this isn't used for now */
     { &WarningsAreErrors,       "error"                 },
+    { &WarnStructParam,         "struct-param"          },
     { &WarnUnknownPragma,       "unknown-pragma"        },
     { &WarnUnusedLabel,         "unused-label"          },
     { &WarnUnusedParam,         "unused-param"          },
diff --git a/src/cc65/error.h b/src/cc65/error.h
index d51b9093b..ad66a1506 100644
--- a/src/cc65/error.h
+++ b/src/cc65/error.h
@@ -60,6 +60,7 @@ extern unsigned WarningCount;
 /* Warning and error options */
 extern IntStack WarnEnable;             /* Enable warnings */
 extern IntStack WarningsAreErrors;      /* Treat warnings as errors */
+extern IntStack WarnStructParam;        /* Warn about structs passed by val */
 extern IntStack WarnUnusedLabel;        /* Warn about unused labels */
 extern IntStack WarnUnusedParam;        /* Warn about unused parameters */
 extern IntStack WarnUnusedVar;          /* Warn about unused variables */