# Bugs in Pedantic Mode

**URL:** <https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961>\
**Category:** Developers\
**Tags:** pedantic\
**Created:** [June 10, 2021, 2:19pm UTC](https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961 "2021-06-10T14:19:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrewgelman](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/andrewgelman/32/1577_2.png) [@andrewgelman](https://discourse.mc-stan.org/u/andrewgelman)\
**Post date:** [June 10, 2021, 2:19pm UTC](https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961/1 "2021-06-10T14:19:17Z")

</div>

Hi, Aki and I were playing around with some simple examples and found things that pedantic mode wasn’t catching. See below.  
Andrew

–

First we created a model with three parameters, two of which had no prior:

```
parameters {
  real a;
  real b;
  real c;
}
model {
  a ~ normal(0, 1);
}

```

Pedantic mode returned: “Warning: The parameter c was declared but was not used in the density calculation.”

But what about the parameter b?

Here’s another:

```
data {
  real y;
}
parameters {
  real a;
  real b;
  real c;
}
model {
  y ~ normal(a + b + c, 1);
}

```

This time, pedantic returned, “Warning: The parameter c has no priors.  
Warning: The parameter b has no priors.”

What happened to a?

---

<div class="post-metadata">

**Author:** ![rybern](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/rybern/32/5888_2.png) [@rybern](https://discourse.mc-stan.org/u/rybern)\
**Post date:** [June 10, 2021, 2:22pm UTC](https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961/2 "2021-06-10T14:22:15Z")

</div>

Bizarre! Thanks for reporting.

---

<div class="post-metadata">

**Author:** ![rybern](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mc-stan.org/rybern/32/5888_2.png) [@rybern](https://discourse.mc-stan.org/u/rybern)\
**Post date:** [June 10, 2021, 2:28pm UTC](https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961/3 "2021-06-10T14:28:12Z")

</div>

Hmm, these examples work fine on my local Stanc3 build. It seems like the interface clipped off the last line of the warnings. Was this CmdStanR?

Edit:  
I noticed that the way Stanc3 prints out warnings has some weird formatting that could have caused this. I fixed that, but we should also probably fix this whatever interface you were using.

---

<div class="post-metadata">

**Author:** ![rok\_cesnovar](https://avatars.discourse-cdn.com/v4/letter/r/7bcc69/32.png) [@rok\_cesnovar](https://discourse.mc-stan.org/u/rok_cesnovar)\
**Post date:** [June 10, 2021, 2:51pm UTC](https://discourse.mc-stan.org/t/bugs-in-pedantic-mode/22961/4 "2021-06-10T14:51:02Z")

</div>

Will do, thanks!
