It's not forbidden but it's subject to security agents' mood at the time. They have the authority to make you toss it ... just plan accordingly and make sure your snacks are in retail packaging. Sooooo maybe not sandwiches!
I say this because coming back from Orlando, the first TSA agent we encountered looked at the sealed and freshly-cold juice bottle from the vending machine that they watched us buy and said, "tell the next agent that your child REQUIRES this for a MEDICAL NEED or I cannot let you pass this point with it." I agreed and moved forward ; the next agent got right in my face and started barking, "NO LIQUIDS!" and shoving a trash bag at me. I looked back at the first agent who looked at me, I said, "My child requires this as a medical need." He looked at her, then he looked at me, then he shoved the bag in my face again and shouted, "I'm the agent who is dealing with you now, it doesn't matter what she told you back there. I said NO LIQUIDS!" My DH threw the brand-new juice in the trash because it was clear that this TSA agent was ready to go ballistic if anyone challenged his reasoning. And then we had to spend $$$$ on the airplane flight's snack packs because all we had in the carry-on was candy, and I just couldn't eat anything else from Goofy's Candy Co. without throwing up from all the sugar...