# Compiler option to warn about argument declarations of x(1) instead of x(\*)

**URL:** <https://fortran-lang.discourse.group/t/compiler-option-to-warn-about-argument-declarations-of-x-1-instead-of-x/9285>\
**Category:** Uncategorized\
**Created:** [March 2, 2025, 7:58pm UTC](https://fortran-lang.discourse.group/t/compiler-option-to-warn-about-argument-declarations-of-x-1-instead-of-x/9285 "2025-03-02T19:58:49Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [March 3, 2025, 6:16pm UTC](https://fortran-lang.discourse.group/t/compiler-option-to-warn-about-argument-declarations-of-x-1-instead-of-x/9285/12 "2025-03-03T18:16:04Z")

</div>

> [@feenberg](#):
>
> but not an expression.

That makes more sense now. I’ve asked myself the same question as @Beliavsky before, when I was fixing the issue in the thread:

> [@Aliasing issue with zero-length array](https://fortran-lang.discourse.group/t/aliasing-issue-with-zero-length-array/9012):
>
> I am refactoring a F77 code for solving a system of second order PDEs along with coupled ODEs (if any). While testing, I encountered an aliasing bug that goes unnoticed even when warning and instrumentation flags are turned on. Assume the global vector of unknowns is stored in an array U(NEQN) where NEQN = NPDE\*NPTS + NV, and NPDE is the number of PDE variables NPTS is the number of grid points for the PDE semi-discretization NV is the number of ODE variables (a non-negative number) the eleme…

Nowadays expressions are allowed:

```auto
subroutine demo1(n,x)
    integer :: n
    real :: x(n*n/2)
    print *,x
end subroutine

subroutine demo2(x,ipar)
    integer :: ipar(7)
    real :: x((ipar(1)**2)/2)
    print *, x
end subroutine

```

and an array is allowed to have zero-length which clashes with the (non-standard) `v(1)` convention.

---

_[View the full topic](https://fortran-lang.discourse.group/t/compiler-option-to-warn-about-argument-declarations-of-x-1-instead-of-x/9285)._
