Smooth in codimension-k and the weight filtration Let $X$ be an algebraic variety. Then $H_{et}^k(X)$ has a filtration whose associated graded pieces are labeled by "weights", certain integers between $0$ and $2k$. If $X$ is smooth, then the weights are between $k$ and $2k$.
If we know that $X$ is smooth in codimension $c$, do we get a nontrivial bound on the weights of $H^k_{et}(X)$?
 A: I'll keep this short. If I understood your question correctly then you might want
to use something like Gabber purity for intersection cohomology. In certain ranges
this gives you information for ordinary cohomology. E.g. if $X$ is proper with isolated
singularities, then $H^i(X)=IH^i(X)$ is pure of weight $i$ for $i> \dim X$.
The reference for this is BBD. But perhaps 
http://www.math.purdue.edu/~dvb/preprints/delgab.pdf
would be helpful as well.
A: Assume for simplicity that X is projective. Then you have a Gysin sequence
$H^i_c(X_{smooth})\to H^i_c(X)\to H^i_c(X_{sing})\to\dots$
If $X_{sing}$ has small dimension then for large $i$ you find isomorphisms
$H^{2n-i}(X_{smooth})^*(-n)\cong H^i_c(X)=H^i(X)$. This limits the weights.
For non-proper X you probably need alterations in order to compare $H^i_c(X)$ and $H^i(X)$.
(In char 0 you could use resolution of singularities to compare $H^i_c(X)$ and $H^i(X)$.)
A: The geometry certainly puts restrictions on the weights. For proper varieties, the allowed weights on $H^m(X)$ are between $0$ and $m$. So on $H^1$, the weights are $0$ and $1$; but if $X$ is normal, $H^1$ is pure of weight one (reflected in the fact that the Picard variety is an abelian variety).
This is an example of the type of restrictions you seek, if I am not mistaken.
A general result may be in the literature (this is very probable). The suggestion of Shenghao of using devissage and using induction on the dimension of $X$ seems right on target. 
The weight filtration in characteristic zero and over a finite field are related and even compatible; the argument is by spreading out to  Spec $Z[1/N]$ for some positive integer $N$ and this works even for singular varieties. See Deligne's ICM 1974 address (the examples in section 3, and sections 7, 13 and 14 are the relevant ones).
A: I think the following is a common point to the previous answers. It is a very general and important step in many "devissages" of mixed sheaves (perverse sheaves, D-modules, mixed Hodge modules etc...) and illustrates why resolution of singularities is so important. This is really standard but it was never clearly explained to me and I don't know a good reference for it so I thought it was worth a post. If anyone has a good reference for it I'd be glad to read it.
Let's consider a proper morphism $\pi: Y\to X$ that is a isomorphism outside $i:Z\hookrightarrow X$. Basically $\pi$ is a resolution of the singularities. Then we have a distinguished triangle 
$$
  F \to \pi_{*} \pi^{*} F \to i_* Q \to +1
$$
where $Q = Cone(i^* F \to i^* \pi_* \pi^* F)$ (using proper base change).
Taking cohomology (by that I mean $H^i(a_*-)$ with $a:X\to pt$) we get 
$$
   H^i(X,F) \to H^{i}(Y,F) \to H^i(Z,Q) \to H^{i+1}(X,F)
$$
If $\pi$ is a blowup with smooth center $Z$, we have $Q = \bigoplus_{q=1}^{c-1} i^*F(-q)[-2q]$ so this is really easy. By iterating, we get results in the case we have a nice  resolution of singularities (sequence of blow-ups with smooth centers giving a normal crossing divisor). So we reduced the problem to computing cohomology on a normal crossing divisor. And by induction on the number of irreducible components this reduces to the case of a a smooth variety.
In your case what you want is to control the weights of $H^i(Z,Q)$ so the suggestion is to track the weight filtration in the previous reasoning which (in theory) isn't so hard since it is strict. 
I don't know enough about alterations to comment about positive caracteristic but I think the principles are the same.
