Print this page
4210 unsigned unsigned short short is valid in dtrace
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Eric Diven <eric.diven@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
*** 19,29 ****
* CDDL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2012 by Delphix. All rights reserved.
*/
#include <strings.h>
#include <stdlib.h>
#include <limits.h>
--- 19,29 ----
* CDDL HEADER END
*/
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
! * Copyright (c) 2013 by Delphix. All rights reserved.
*/
#include <strings.h>
#include <stdlib.h>
#include <limits.h>
*** 264,273 ****
--- 264,293 ----
ddp = dt_decl_push(dt_decl_alloc(CTF_K_UNKNOWN, NULL));
ddp->dd_attr = attr;
return (ddp);
}
+ if ((attr & DT_DA_LONG) && (ddp->dd_attr & DT_DA_LONGLONG)) {
+ xyerror(D_DECL_COMBO, "the attribute 'long' may only "
+ "be used at most twice in a declaration");
+ }
+
+ if ((attr & DT_DA_SHORT) && (ddp->dd_attr & DT_DA_SHORT)) {
+ xyerror(D_DECL_COMBO, "the attribute 'short' may only be "
+ "used at most once in a declaration");
+ }
+
+ if ((attr & DT_DA_SIGNED) && (ddp->dd_attr & DT_DA_SIGNED)) {
+ xyerror(D_DECL_COMBO, "the attribute 'signed' may only be "
+ "used at most once in a declaration");
+ }
+
+ if ((attr & DT_DA_UNSIGNED) && (ddp->dd_attr & DT_DA_UNSIGNED)) {
+ xyerror(D_DECL_COMBO, "the attribute 'unsigned' may only be "
+ "used at most once in a declaration");
+ }
+
if (attr == DT_DA_LONG && (ddp->dd_attr & DT_DA_LONG)) {
ddp->dd_attr &= ~DT_DA_LONG;
attr = DT_DA_LONGLONG;
}